Psotfix relay - lost connection after UNKNOWN from



  • Hello all i am having trouble getting pfsense and the postfix relay package to send any mails as a test i have tried setting up email notifications using the pfsense machine as a the smtp server like in the attached screen shot

    This is what i get in the logs

    php: /system_advanced_notifications.php: Could not send the message to ryan@computerking.ca – Error: could not connect to the host "10.22.20.254": ??
    Sep 20 01:23:53 postfix/smtpd[58824]: disconnect from pfsense.solar.lan[10.22.20.254]
    Sep 20 01:23:53 postfix/smtpd[58824]: lost connection after UNKNOWN from pfsense.solar.lan[10.22.20.254]
    Sep 20 01:23:53 postfix/smtpd[58824]: connect from pfsense.solar.lan[10.22.20.254]

    I have tried a telnet session and it works internally ( see below )  on the pfsense machine as well as on another machine on the system

    telnet 10.22.20.254 25
    Trying 10.22.20.254…
    Connected to pfsense.solar.lan.
    Escape character is '^]'.
    220 pfsense.solar.lan ESMTP Postfix
    421 4.4.2 pfsense.solar.lan Error: timeout exceeded
    Connection closed by foreign host.

    Did some digging around on google but did not seem to find anything that helped me, sorry if i am missing something obvious

    PS not clear on how to add the rules to the firewall and/or nat for postfix relay package or if they are even needed ... could  it have anything to do with that?


  • Banned

    You should allow port 25 on WAN.


  • Banned

    @c0mputerking:

    PS not clear on how to add the rules to the firewall and/or nat for postfix relay package or if they are even needed … could  it have anything to do with that?

    You should allow port 25 on WAN.

    @c0mputerking:

    Connected to pfsense.solar.lan.
    Escape character is '^]'.
    220 pfsense.solar.lan ESMTP Postfix
    421 4.4.2 pfsense.solar.lan Error: timeout exceeded
    Connection closed by foreign host.

    The timeout is no error! You simply did not send any mail, so postfix disconnected the inactive session.



  • Can you explain what you mean by "…getting pfsense and the postfix relay package to send any mails..."?

    Allowing port 25 on WAN won't help with sending emails.



  • As for a explaination … I try to send a notifcation test email using SMTP setup like in the attached screenshot in my first post get no emial and errors in the system log lastly again telnet seems to work and my LAN is wide default open for firewall for now

    php: /system_advanced_notifications.php: Could not send the message to ryan@computerking.ca -- Error: could not connect to the host "10.22.20.254": ??
    Sep 20 01:23:53    postfix/smtpd[58824]: disconnect from pfsense.solar.lan[10.22.20.254]
    Sep 20 01:23:53    postfix/smtpd[58824]: lost connection after UNKNOWN from pfsense.solar.lan[10.22.20.254]
    Sep 20 01:23:53    postfix/smtpd[58824]: connect from pfsense.solar.lan[10.22.20.254]

    PS i am kind of repeating myself here but maybe i wasnt clear in my first post



  • The postfix package is an email relay, not a full mail server - i.e., no mailboxes.  Where is the real mail server that receives emails for the computerking.ca domain?

    To send notifications like that from pfSense they should go, direct, to a real mail server.  No need for postfix.



  • computer\king.ca is across town so exteral ip/network  Ok so i need to set notification diffently?? and direct to computerking.ca??  I also would like systems on my LAN to use pfsense as relay to the main computerking.ca mail server is that what this setup is for?



  • @c0mputerking:

    computer\king.ca is across town so exteral ip/network 
    Ok so i need to set notification diffently?? and direct to computerking.ca?? 
    I also would like systems on my LAN to use pfsense as relay to the main computerking.ca mail server
    is that what this setup is for?

    Yes, notifications go direct to the mail server for computerking.ca  They're being sent from the firewall so no need for them to pass through postfix.

    I don't really see the point of sending via postfix to the computerking.ca mail server but, yes, you could use it for that.

    The most common use for the postfix package is in front of a mail server on the LAN/DMZ to prevent spammers from hitting it.  However, you can use it to apply anti-spam filtering to outgoing mail from LAN PCs and servers.


Log in to reply