What is a neat way to delete a stale amavisd pid_file on first boot after panic or power failure?

Lion Mail Server component postfix/smtp 100% reproducible blocks inbound smtp mail delivery on first boot after a panic or power failure.
Error messages from mail.log are like:
postfix/smtp[45785]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused postfix/smtp[45785]: 2F7131F9A97: to=<[email protected]>, relay=none, delay=76041, delays=76040/0.36/0.05/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused) postfix/error[45790]: 550D61F9A99: to=<[email protected]>, relay=none, delay=76040, delays=76040/0.39/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused) postfix/postscreen[45872]: NOQUEUE: reject: RCPT from [100.200.100.159]:65392: 450 4.3.2 Service currently unavailable; from=<[email protected]>, to=<[email protected]>, proto=ESMTP, helo=<host.domain.tld> /usr/libexec/postfix/greylist.pl[45885]: Temporary message rejection to: <[email protected]> from: <[email protected]> sent from: [100.200.100.159] for: 60 seconds due to greylisting postfix/smtpd[45879]: NOQUEUE: reject: RCPT from host.domain.tld[100.200.100.159]: 450 4.7.1 <[email protected]>: Recipient address rejected: Service is unavailable; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<host.domain.tld>
The issue seems to be related to the amavis content filter due to the connection to port number 10024 and amavisd being configured on that port. Amavis.log:
/usr/bin/amavisd[236]: (!)Net::Server: 2012/07/25-13:38:49 Pid_file already exists for running process (88)... aborting\n\n  at line 277 in file /System/Library/Perl/Extras/5.12/Net/Server.pm ... /usr/bin/amavisd[236]: Net::Server: 2012/07/25-13:38:49 Server closing! ...repeating roughly every 10 seconds...
The workaround is to reboot the machine, after the second boot the inbound smtp mail delivery is no longer stuck.
The issue seems to be related to http://serverfault.com/questions/138690/amavisd-net-server-pid-file-already-exis ts-after-system-crash-and-startup
How to permanently fix Apple Mail Server to accept smtp inbound messages on first boot, by removing the left over amavis pid_file from the previous unclean shutdown?

Use connection pooling. This will put the connection management in the hands of the webserver, not your code. Check out this post:
http://forum.java.sun.com/thread.jspa?threadID=741788&messageID=4252932#4252932

Similar Messages

  • In iTunes 11, what is the best way to delete the iTunes purchased song from my library after I create an aiff copy?

    I use my MacBook Pro as a music server. After downloading a song from the iTunes store I create an AIFF copy in my laptop's iTunes  Library. I then delete the original purchased song from the library to avoid duplicates. In iTunes prior to version 11 I had no difficulties doing this. The purchased copy just went back to the cloud and awaited future download onto other devices  leaving the new AIFF copy in my laptop's library. In iTunes 11 it is not as easy. The purchased version wants to stay in my library even after it is  deleted. What is the best (simplest) process to delete the compressed copy completely from my laptop's library while leaving the Aiff version. However, I want the original version to be available in the cloud for download on my other devices. Quite often my efforts have resulted in hiding the song frm the cloud! Any suggestion.....?

    Zice wrote:
    I want higher resolution then afforded in the original download.
    Then why are you converting iTunes purchases?
    You cannot get higher resolution by converting  the original. This goes for converting anything, not just iTunes purchases.
    Creating an AIFF will simply make the file 10 time as large with zero increase in quality.
    Don't really want to debate value of creating the new version.
    Agreed.
    You are simply wasting time and drive space converting iTunes purchases to AIFF.

  • What is the easiest way to delete a song or album?  Also, how do I get rid of the tunes it cannot convert or find?

    What is the easiest way to delete a song or album directly off the iPod?  Also, how do I get rid of the tunes it cannot convert so it does'nt run through them every time I upload an album or song?

    Right click the song you want to get rid of and there should be a delete button.

  • There are over 4000 duplicates in my iTunes. What is the fastest way to delete them?

    There are over 4000 duplicates in my iTunes. What is the fastest way to delete them?

    Hello there, yandere69keita.
    The following Knowledge Base clarifies your concern about your My Photo Stream counting towards your iCloud storage:
    iCloud: My Photo Stream FAQ
    http://support.apple.com/kb/ht4486
    Does My Photo Stream use my iCloud storage?
    No. Photos uploaded to My Photo Stream do not count against your iCloud storage.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • What is the BEST way to delete an app on an iPhone 4S so it will NOT be added back when I sync with iTunes?

    What is the BEST way to delete an app on an iPhone 4S so it will NOT be added back when I sync with iTunes?

    To completely remove an app and all of its data, do this: First delete the app on your phone, then in iTunes, under Library, click on Apps, right-click the app you want to delete & select delete, when prompted, move all files to trash, empty your trash. Connect your phone and sync. The app and all of its data will be gone.

  • HT1417 What's the quickest way to delete duplicates without going song by song?

    What is the quickest way to delete duplicates from i tunes library without going song by song?  I just transferred my music from my ipod classic to my computer and now I have a lot of duplicate music.  Most is from CD's I reburned or music I was able to get back on my new computer through I tunes.  It is from my personal i pod (one of 4).  I finally figured out how to get it off the ipod and back onto my newer computer. I made sure to go to advanced setting and check "keep i tunes folder organized" but it still saved all duplicates.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • What is the easiest way to delete emails on an IPhone 4S?

    what is the easiest way to delete emails on an IPhone 4S?

    In the email list, swipe to the left and tap delete.  (iOS 7, but similar in iOS 6).

  • What is the easiest way to delete multiple duplicate songs?

    What is the easiest way to delete multiple duplicate songs?

    1. Google it. You may find third party applications that do what you want.
    2. Here is the link to an Apple discussion thread.
    https://discussions.apple.com/thread/3721976?start=0&tstart=0
    3. Backup before you do anything.

  • What is the best way to delete MacKeeper?

    I installed MacKeeper last year in an attempt to free up some hard drive space on my former hard drive. I now have a new SSD and have no need for MacKeeper. In addition, I see that this programme attracts a lot of negative press.
    What is the best way to delete MacKeeper from my hard drive and Time machine?

    Remove the "MacKeeper" crapware as follows. First, back up all data.
    "MacKeeper" has only one useful feature: it deletes itself.
    Note: These instructions apply to the version of the product that I downloaded and tested in early 2012. I can't be sure that they apply to other versions.
    IMPORTANT: "MacKeeper" has what the developer calls an “encryption” feature. In my tests, I didn't try to verify what this feature really does. If you used it to “encrypt” any of your files, “decrypt” them before you uninstall, or (preferably) restore the files from backups made before they were “encrypted.” As the developer is not trustworthy, you should assume that the "decrypted" files are corrupt unless proven otherwise.
    In the Finder, select Go ▹ Applications from the menu bar, or press the key combination shift-command-A. The "MacKeeper" application is in the folder that opens. Quit it if it's running, then drag it to the Trash. You'll be prompted for your login password. Then a dialog will pop up asking why you want to uninstall it. You don't have to provide that information. Enter anything you like in the text box, then click the Uninstall MacKeeper button. All the functional components of the software will be deleted. Reboot.
    Do not try to uninstall by dragging the MacKeeper icon in the Dock or the LaunchPad to the Trash.
    Here are some general suggestions. If you want your computer to be usable, don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” "tune-ups," “accelerators,” “extenders,” “cleaners,” “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, this kind of material is useless, or worse than useless.
    The more actively promoted the product, the more likely it is to be garbage. The most extreme example is the “MacKeeper” scam.
    The only software you should install is that which directly enables you to do the things you use a computer for — such as creating, communicating, and playing — and does not modify the way other software works. Never install any third-party software unless you know how to uninstall it.

  • What is the best way to delete applications?

    I am told that my Mac came with everything I need in the way of programs for basic functions.  What is the best way to delete applications making sure there are no threads left in Library and other places?

    Yes, but not always. An example of what I call "System" files/folders would be Quicktime or things like pre-installed print and scanner drivers. You have to be pretty confident to go rummaging through files in either /System or /Library. Most of the time there is no reason to be in there.
    An example of a file that is in those system folders, that does not come pre-installed as of Lion, is Flash plug-ins. That gets installed in the /Library/Internet Plug-Ins
    But your average App downloaded from the MAS, most of it's files will be in the User Folder   ~/username

  • What is the quickest way to delete personal info prior to recycling?

    We are downsizing and my trusty iMac (10 years old I think) has to go, what is the best way to delete personal stuff?

    The preferred and/or fastest method to ensure removal of all personal data depends on whether the computer is going to the recycling heap for safe disposal or whether it will be given/sold to a future user.  In the former case, removing and keeping the hard drive can  be the fastest way to do so, but that depends on the design of the computer in question.  Since you have a 10 year-old iMac, I'll assume it's an iMac G4.  Hard drive removal is more involved for that model, than it is for other Macs that can be opened quickly.  The other method is to boot the computer from the installer disk, run Disk Utility and select the hard drive to erase and reformat as a Mac OS Extended volume.  Choose the option to "write zeros" to the drive, as this will overwrite the existing data.  It takes longer, but you indicated that you wanted to remove personal info.  If you're donating the computer to an organization for future use, re-install the OS and include the original disks.

  • What is the quickest way to delete thousands of emails?

    What is the quickest way to delete thousands of emails?

    If you are using Apple Mail, you should be able to select a whole bunch of them at once and delete them (there are two commands for this under the Edit menu, Select All and Delete), then empty the Mail trash.
    If you are reading an email account through a web browser, they should provide a way to select multiple files. Usually it is a checkbox at the top of a column that selects the entire column when checked. If they let you increase the number of messages visible at once, you can select more at a time.

  • What's the best way to charge my iphone 6 for the first time ?

    what's the best way to charge my iphone 6 for the first time ?

    Just charge it to 100%.
    Use it on the charger when possible. Recharge when the battery is around 50% when possible. Avoid to let the battery go down below 20%.
    Read here about modern Li batteries
    http://batteryuniversity.com
    Lex

  • What's the right way to delete an entire backup ?

    I've had two Macs doing wireless Time Machine backups to one Time Capsule.
    Question: I got rid of one Mac, and want to delete its backup entirely (but leave the other computer's backups untouched). What's the right way to do it?

    Bob Timmons wrote:
    Jespes, welcome to the discussions!
    Open your hard drive. Your Time Capsule icon should appear under the SHARED heading.
    Click on the Time Capsule and a folder will appear to the right.
    Double click the folder and you should see a xxxxxx.sparsebundle file for each computer that has been backing up.
    Click on the xxxxx.sparsebundle file that you want to delete to highlight it and then click the gear shaped icon just above. Select Move to Trash. (Do not drag the file to the Trash as this will not work).
    Be careful, as the file will be deleted instantly and you will not be able to retrieve it.
    many thanks!

  • What's the best way to delete 2.4 million of records from table?

    We are having two tables one is production one and another is temp table which data we want to insert into production table. temp table having 2.5 million of records and on the other side production table is having billions of records. the thing which we want to do just simple delete already existed records from production table and then insert the remaining records from temp to production table.
    Can anyone guide what's the best way to do this?
    Thanks,
    Waheed.

    Waheed Azhar wrote:
    production table is live and data is appending in this table on random basis. if i go insert data from temp to prod table a pk voilation exception occured bcoz already a record is exist in prod table which we are going to insert from temp to prod
    If you really just want to insert the records and don't want to update the matching ones and you're already on 10g you could use the "DML error logging" facility of the INSERT command, which would log all failed records but succeeds for the remaining ones.
    You can create a suitable exception table using the DBMS_ERRLOG.CREATE_ERROR_LOG procedure and then use the "LOG ERRORS INTO" clause of the INSERT command. Note that you can't use the "direct-path" insert mode (APPEND hint) if you expect to encounter UNIQUE CONSTRAINT violations, because this can't be logged and cause the direct-path insert to fail. Since this is a "live" table you probably don't want to use the direct-path insert anyway.
    See the manuals for more information: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB
    Sample taken from 10g manuals:
    CREATE TABLE raises (emp_id NUMBER, sal NUMBER
       CONSTRAINT check_sal CHECK(sal > 8000));
    EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');
    INSERT INTO raises
       SELECT employee_id, salary*1.1 FROM employees
       WHERE commission_pct > .2
       LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;
    SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;
    ORA_ERR_MESG$               ORA_ERR_TAG$         EMP_ID SAL
    ORA-02290: check constraint my_bad               161    7700
    (HR.SYS_C004266) violatedIf the number of rows in the temp table is not too large and you have a suitable index on the large table for the lookup you could also try to use a NOT EXISTS clause in the insert command:
    INSERT INTO <large_table>
    SELECT ...
    FROM TEMP A
    WHERE NOT EXISTS (
    SELECT NULL
    FROM <large_table> B
    WHERE B.<lookup> = A.<key>
    );But you need to check the execution plan, because a hash join using a full table scan on the <large_table> is probably something you want to avoid.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

Maybe you are looking for