Tagged: Postfix Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 4:05 pm on April 23, 2015 Permalink | Reply
    Tags: , , Postfix   

    Categories: Linux, Plesk ( 96 )

    How to open SMTP port 587 to send emails in Plesk 

    Plesk-LogoBy default Plesk on Linux uses Postfix for outgoing email, and by default listens on port 25 for outgoing SMTP mail. Some service providers do not allow to send emails on that port, and tragedy occurs: clients can’t send email with their Plesk servers. Not good.

    Other SMTP ports will usually work, such as the other favourite 587 – but by default, Postfix is not listening on this port for email submissions – at least not in Plesk 12.0.8 on CentOS 7.

    Here’s how to enable port 587 for such ventures:

    Open the Postfix configuration file at /etc/postfix/master.cf and find the following line. It’s commented out. All we have to do is to remove the hash in front of it, and email can be sent via port 587:

    submission inet n       -       n       -       -       smtpd
    

    Restart Postfix for the changes to take effect. In CentOS 5 and 6:

    service postfix restart
    

    This will also work in CentOS 7, but to be more precise:

    systemctl restart postfix.service
    

    Happiness!

    Note that port 587 needs to be open in your firewall. If the Plesk Firewall Extension is enabled, it’ll take care of it for you automagically.

     





     
    • Newman 8:06 am on December 29, 2016 Permalink | Reply

      Thank you for this!I am now able to send email from ec2 instance.

  • Jay Versluis 2:52 pm on March 10, 2014 Permalink | Reply
    Tags: , Postfix   

    Categories: Linux ( 96 )

    The Postfix Cheat Sheet 

    mail-iconI recently had some trouble with my postfix mail service. Not knowing where to being looking for log files and restart commands, I thought this quick cheat sheet would come in handy in the future:

    Starting and Stopping

    On CentOS we can speak to postfix like this:

    postfix start
    postfix stop
    postfix reload

    The this command re-reads the configuration files. Note that there is no restart command – you have to stop and then start the service again manually.

    Log Files

    On CentOS 6.5 I could find the log files in /var/log/maillog (that’s a file not a directory). Other installations may have it in /var/log/mail. Refer to your own /etc/syslog.conf file for the exact location.

    To display log events life we can make use of tail -f

    tail -f /var/log/maillog

    Alternatively we can come through the entire log and display the tricky bits:

    egrep '(warning|error|fatal|panic):' /var/log/maillog | more

    Note that log files are rotated – what you’re looking for may be hiding in other log files (such as maillog-201xxxxx).

    Postfix in Plesk

    If you’re using Plesk then you can see the individual components of the service under Tools and Settings (or Server if you’re using Power User View) – Services Management. You can start/stop/restart each aspect from here.

    Sometimes the SMTP service appears to be offline even though it’s running. This can happen on CentOS. It’s nothing to worry about – simply restart the service from the command line as explained above and it should show up fine in Plesk.

    Screen Shot 2014-03-10 at 14.51.03

    Further Reading

    If you have any further ideas, please let me know in a comment below.





     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel