Results 1 to 7 of 7

Thread: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

  1. #1
    Join Date
    Feb 2012
    Location
    California
    Posts
    28

    Default Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Hello,

    I am trying to set up postfix with googlemail relay on a small server at my workplace but it desperately refuses to work. First I tried to edit /etc/postfix/main.cf manually and then restart postfix by running "systemctl reload postfix" as it is described at many internet sources but it was not successful. As I have the same version of OpenSuse installed on my laptop, I just tried to configure postfix by using YAST and this was successful. The problem is that the same settings made in yast for my server PC just do not work. Any email I am trying to send returns back and I can see the following message in the mail folder on the server (/var/mail/admin):

    Error message:

    Final-Recipient: rfc822; example@example.com (there is a real E-mail address in there)
    Action: failed
    Status: 5.7.0
    Remote-MTA: dns; smtp.googlemail.com
    Diagnostic-Code: smtp; 530 5.7.0 Must issue a STARTTLS command first.
    bs2sm475454pbd.74 - gsmtp


    --6A04CAC0A54.1425378203/linux.local
    Content-Description: Undelivered Message
    Content-Type: message/rfc822

    If I do the same on my laptop, it just works fine.
    I tried to compare the YAST-generated settings in /etc/postfix/main.cf on these two machines, but they seem to quite similar with one strange difference:

    The broken conf:

    ############################################################
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options =
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtpd_sasl_auth_enable = no
    #smtpd_sasl_path = private/auth
    #smtpd_sasl_type = dovecot
    ############################################################
    # TLS stuff
    ############################################################
    #tls_append_default_CA = no
    relay_clientcerts =
    #tls_random_source = dev:/dev/urandom


    smtp_use_tls = yes
    #smtp_tls_loglevel = 0
    smtp_enforce_tls = no
    smtp_tls_CAfile =
    smtp_tls_CApath = /etc/ssl/certs
    smtp_tls_cert_file = /etc/ssl/
    smtp_tls_key_file = /etc/ssl/


    The working conf:



    ############################################################
    # SASL stuff
    ############################################################
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options =
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtpd_sasl_auth_enable = no
    ############################################################
    # TLS stuff
    ############################################################
    #tls_append_default_CA = no
    relay_clientcerts =
    #tls_random_source = dev:/dev/urandom


    smtp_use_tls = yes
    #smtp_tls_loglevel = 0
    smtp_enforce_tls = no
    smtp_tls_CAfile =
    smtp_tls_CApath = /etc/postfix/ssl/certs
    smtp_tls_cert_file =
    smtp_tls_key_file =

    The three parameters highlighted in bold are different between the two machines, but:
    If I just copy the three bold lines from the working conf and paste them on the place of the bold lines in the broken one and then restart postfix, it just stops working (any sent mail will be neither delivered nor returned).
    If I first replace the bold lines in the broken conf and then run yast on the server and go there through the settings and save them, the broken conf file is restored completely.
    Interestingly, there is no directory or file /etc/postfix/ssl/certs on the working machine, but there is a directory /etc/ssl/certs on both machines. So, somehow the working conf refers to a non-existent directory whereas the broken one refers to an existent one and still fails.
    I have also tried to remove postfix from the server, delete the /etc/postfix directory completely and reinstall it using yast or zypper on the server, but all results remained the same: any email returns undelivered with the message shown above. Restart of the server does not help as well.
    The googlemail configuration (account name, password) is completely identical on both machines.

    Does anyone have any idea what might cause such a bug and what could be a solution for this?

    Konstl

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Is your /etc/sysconfig/postfix identical on both systems as well?

    If /etc/sysconfig/mail has MAIL_CREATE_CONFIG="yes", the sysconfig postfix file will dictate what settings are used when rcpostfix / systemctl is being called.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Feb 2012
    Location
    California
    Posts
    28

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Originally, they were a bit different, but then I tried to copy a working /etc/sysconfig/postfix file from the laptop to the server and then reconfigure postfix with yast. This did not help, then I uninstalled postfix, delete all the files but the /etc/sysconfig/postfix and then installed it again and configured it with yast.
    All this ended up in completely dead postfix on the server (no error messages in journalctl, no returned e-mails, nothing gets delivered). /etc/sysconfig/postfix files are just equal now and the bold lines in /etc/postfix/main.cf are identical. The difference is: postfix works on the laptop and is just dead on the server.

    Konstl

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Using Wicked or networkManager on BOTH machines??

  5. #5
    Join Date
    Feb 2012
    Location
    California
    Posts
    28

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Quote Originally Posted by gogalthorp View Post
    Using Wicked or networkManager on BOTH machines??
    Network manager on both.

  6. #6
    Join Date
    Feb 2012
    Location
    California
    Posts
    28

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    Update: Postfix is not just dead with new settings but

    The E-mails are coming back to /var/mail/ after some time with an error:

    <QUOTE>Your message could not be delivered for more than 1 hour(s).
    It will be retried until it is 5 day(s) old.


    For further assistance, please send mail to postmaster.


    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.


    The mail system


    <example@example.com>: connect to
    smtp.googlemail.com[2607:f8b0:400e:c01::10]:587: Network is unreachable


    --86752A80BCC.1425390977/linux.local
    Content-Description: Delivery report
    Content-Type: message/delivery-status


    Reporting-MTA: dns; linux.local
    X-Postfix-Queue-ID: 86752A80BCC
    </QUOTE>

    Telnet smtp.gmail.com 587 from the server works just fine:

    <QUOTE>Trying 173.194.79.109...
    Connected to smtp.gmail.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP v8sm1934151pbs.0 - gsmtp
    </QUOTE>

    Other network services on the server (samba, ssh) are working just fine. I am using iptables on the server (reject tcp and udp from IP regions other than desired) to reject unwanted access via ssh from outside but even if I temporary shut them down, no e-mail can be delivered. Telnet works fine with iptables being active.

  7. #7
    Join Date
    Feb 2012
    Location
    California
    Posts
    28

    Default Re: Postfix does not work on one machine and works on another with the same settings (OpenSuse 13.2)

    I was able to get my server to send E-Mail notifications with msmtp. Postfix just can not do it there due to some reasons. Maybe my initial attempts to manually install it just screwed something up, who knows ...

    I am fine with my msmtp solution now, but if someone knows the possible reasons of postfix failure, I would be very interested to read them.

    Cheers,
    Konstl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •