Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Nov 2003
    Posts
    71

    Default pop before smtp stopped working suddenly

    Pop before SMTP stopped working last night and we made no changes, my guess is maybe a cpanel update caused it.

    If I add our IP to /etc/relayhosts I am able to send. /etc/relayhosts is rw-r-r root:root. I tried restarting antirelayd and all it does is clear out my IP, it still doesn't add the IP when I try to receive.

    What could prevent the server from adding the IP of a user to relayhosts? If the server would add the IP's of POP users, it would work ok.

    Thanks for your help!

    Paul
    Blesta
    Professional Billing
    www.blesta.com

  2. #2
    Member
    Join Date
    Jan 2006
    Posts
    50

    Default

    antirelayd reads /var/log/maillog and adds IP addresses to /etc/relayhosts. I've seen pop before smtp break because of log rotation problems in CentOS.

    The easiest way to check for this is to look at the timestamps in /var/log using ls -ltr. If maillog.1 is newer than maillog then you have the log rotation bug where syslogd hasn't re-opened the log files after renaming them. The effect is that new pop connections are writting into maillog.1 but antirelayd is still reading from maillog.

    pkill -HUP syslogd should force syslogd to close and re-open the log files, but search the forums for a more permanent fix.

  3. #3
    Member
    Join Date
    Nov 2003
    Posts
    71

    Default

    Wow, you are a genius, that is exactly what happened.

    I found the following fix, but want to confirm if its correct:

    vi /etc/cron.daily/logrotate
    add
    export TMPDIR=/var/tmp

    My logrotate file currently contains:

    #!/bin/sh

    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit 0

    Where in logrotate would I put "export TMPDIR=/var/tmp", the end after exit 0? and will this even permanently fix the issue?

    Thanks!
    Blesta
    Professional Billing
    www.blesta.com

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You put it in after the first line. Yes, it's a permanent fix.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Nov 2003
    Posts
    71

    Default

    My /etc/cron.daily/logrotate file looks like this, and the system reverted back to writing to maillog.1 instead of maillog:

    #!/bin/sh
    export TMPDIR=/var/tmp
    /usr/sbin/logrotate /etc/logrotate.conf
    EXITVALUE=$?
    if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
    fi
    exit 0


    Does this look correct? Is there any other reason the system would revert back to writing to maillog.1 instead of maillog?
    Blesta
    Professional Billing
    www.blesta.com

  6. #6
    Member
    Join Date
    Jan 2006
    Posts
    50

    Default

    If /var/tmp is a symlink to /tmp I don't see how adding export TMPDIR=/var/tmp would make any difference.

    My understanding is that the problem occurs when the tmp dir is mounted noexec so the replacement TMPDIR must point to a directory in an non-noexec mounted filesystem.

    I fixed the problem on my systems in an entirely different way: I added a call to pkill -HUP syslogd in the line after the logger command. It may not be the best fix but I haven't had any problems in months.

Similar Threads & Tags
Similar threads

  1. Replies: 5
    Last Post: 09-23-2008, 04:30 PM
  2. FTP stopped working suddenly
    By TapanB in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 05-24-2008, 10:27 AM
  3. Exim suddenly stopped working...
    By WireNine in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-14-2008, 07:02 PM
  4. Replies: 0
    Last Post: 10-27-2006, 04:12 AM
  5. smtp stopped working
    By newfield in forum cPanel and WHM Discussions
    Replies: 22
    Last Post: 06-27-2003, 03:37 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube