trouble installing postfix



  • Hi all,

    i'm trying to install postfix. Not very handy with it, but the manual was pretty clear.
    I did all, but i'm stuck at 2 points.

    when trying to test:

    [email protected]:~$ echo "body of your email" | mail -s "This is a Subject" -a "From: [email protected]" [email protected]
    
    Command 'mail' not found, but can be installed with:
    
    sudo apt install mailutils
    
    

    Also, how do i configure spotipo to use postfix?



  • @Ewald-Sarneel You can install mail using below command

    sudo apt install mailutils
    
    

    To configure spotipo, use localhost as host name 25 as port number



  • HI Rakesh,

    i thought it was a mistake, it wasn't listed in manual.
    After doing this, i'm not getting an error after sending an e-mail with the command..
    but.. i'm also not getting any e-mails.. any suggestions?

    [email protected]:~$ echo "body of your email" | mail -s "This is a Subject" -a "From: [email protected]" [email protected]
    


  • @Ewald-Sarneel Could you please check in /var/log/mail.log is there are any errors ? May be also check in your SPAM folder ?



  • Hi Rakesh,

    spam is clean.. my smtp server support ssl / tls..

    This is what i get after several attemps to send e-mail. Not clear for me what the issue is.

    [email protected]:/var/log$ tail mail.log
    Mar  8 11:32:54 ip-172-31-16-107 postfix/smtp[18057]: A792E7E7AC: to=<[email protected]>, relay=applehome.nl[37.97.159.91]:465, delay=19342, delays=19177/0.02/165/0, dsn=4.4.2, status=deferred (lost connection with applehome.nl[37.97.159.91] while receiving the initial server greeting)
    Mar  8 11:55:09 ip-172-31-16-107 postfix/qmgr[14588]: 4AD627E7A6: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    Mar  8 11:55:09 ip-172-31-16-107 postfix/smtp[18233]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
    Mar  8 11:57:54 ip-172-31-16-107 postfix/smtp[18233]: 4AD627E7A6: to=<[email protected]>, relay=applehome.nl[37.97.159.91]:465, delay=21288, delays=21123/0.02/165/0, dsn=4.4.2, status=deferred (lost connection with applehome.nl[37.97.159.91] while receiving the initial server greeting)
    Mar  8 12:05:09 ip-172-31-16-107 postfix/qmgr[14588]: 43F9D7E7AD: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    Mar  8 12:05:09 ip-172-31-16-107 postfix/qmgr[14588]: C17EE7E7AB: from=<[email protected]>, size=419, nrcpt=1 (queue active)
    Mar  8 12:05:09 ip-172-31-16-107 postfix/smtp[18300]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
    Mar  8 12:05:09 ip-172-31-16-107 postfix/smtp[18301]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
    Mar  8 12:07:54 ip-172-31-16-107 postfix/smtp[18301]: C17EE7E7AB: to=<[email protected]>, relay=applehome.nl[37.97.159.91]:465, delay=21157, delays=20991/0.02/165/0, dsn=4.4.2, status=deferred (lost connection with applehome.nl[37.97.159.91] while receiving the initial server greeting)
    Mar  8 12:07:54 ip-172-31-16-107 postfix/smtp[18300]: 43F9D7E7AD: to=<[email protected]>, relay=applehome.nl[37.97.159.91]:465, delay=21152, delays=20987/0.02/165/0, dsn=4.4.2, status=deferred (lost connection with applehome.nl[37.97.159.91] while receiving the initial server greeting)
    
    

    And this is how postfix config looks like:

    (2019-03-08_1338.png



  • @Ewald-Sarneel All I can see is applehome.nl is dropping connections. May be there is a firewall there ?



  • Stupid.. That was missing indeed.
    But after enabling the firewall, i still get a message:

    as far as i can see, those lines arn't listed in: vim /etc/postfix/main.cf (see picture above)
    Can i just add those?

    2019-03-11_0846.png



  • @Ewald-Sarneel I think so, please try adding those.



  • (/assets/uploads/files/1552459937323-2019-03-13_0751.png)

    Added the lines, but still the same message:

    
    [email protected]:~$ tail /var/log/mail.log
    Mar 13 06:49:52 ip-172-31-16-107 postfix/cleanup[31790]: 385907E922: message-id=<[email protected]internal>
    Mar 13 06:49:52 ip-172-31-16-107 postfix/qmgr[14588]: 385907E922: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    Mar 13 06:49:52 ip-172-31-16-107 postfix/smtp[31812]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
    Mar 13 06:50:26 ip-172-31-16-107 postfix/pickup[31064]: 5789F7E923: uid=1000 from=<[email protected]>
    Mar 13 06:50:26 ip-172-31-16-107 postfix/cleanup[31790]: 5789F7E923: message-id=<[email protected]internal>
    Mar 13 06:50:26 ip-172-31-16-107 postfix/qmgr[14588]: 5789F7E923: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    Mar 13 06:50:26 ip-172-31-16-107 postfix/smtp[31824]: SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
    Mar 13 06:50:32 ip-172-31-16-107 postfix/pickup[31064]: 177D67E924: uid=1000 from=<[email protected]>
    Mar 13 06:50:32 ip-172-31-16-107 postfix/cleanup[31790]: 177D67E924: message-id=<[email protected]internal>
    Mar 13 06:50:32 ip-172-31-16-107 postfix/qmgr[14588]: 177D67E924: from=<[email protected]>, size=423, nrcpt=1 (queue active)
    
    


  • @Ewald-Sarneel said in trouble installing postfix:

    MTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", an

    Sounds quite strange, may be check this out?

    https://serverfault.com/questions/542845/postfix-relay-host-connection-fails-timed-out-while-receiving-initial-server-gr



  • i changed the place of the smtp_tls_security_level = encrypt to the bottem of the script.
    after a restart of postfix, everything is working..

    so for the manual:

    add the line's
    SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)

    and also, install mail utils

    Also maybe suggest changing the firewall


 

});