LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix not accepting external emails (http://www.linuxquestions.org/questions/linux-server-73/postfix-not-accepting-external-emails-534943/)

samnjugu 03-06-2007 12:03 AM

postfix not accepting external emails
 
i have set up my email using the guide named perfect fedora setup, problem is postfix is not accepting external emails i can send emails but if someone replies using my server address .e.g user@domain i can't get them. My server is behind a router and has a local address which lines do i need to change in the config file to enable receiving of external mails.

billymayday 03-06-2007 02:59 AM

Check your firewall is allowing inbound traffic on port 25, that port 25 is forwarded to your postfix machine, and if they are both OK, post the mail log when an external server is trying to connect

samnjugu 03-06-2007 12:30 PM

thanks for the reply i will follow your instructions and get back to you.

samnjugu 03-06-2007 01:22 PM

ok just forwarded port 25 to postfix machine did a test from squirell mail on same machine and i was able to send myself an email but still wont accept any mails from an external system am looking for the log files cant see where they are will check for them then get back to you

billymayday 03-06-2007 01:23 PM

try /var/log/maillog in FC

samnjugu 03-07-2007 07:58 PM

thank you for the poninter on maillog i didnt know where to find it, here it is its a bit long

so i just got a section of it

ar 7 20:36:44 muthii postfix/smtp[5444]: connect to mx4.hotmail.com[65.54.244.104]: Connection timed out (port 25)
Mar 7 20:37:14 muthii postfix/smtp[5444]: connect to mx2.hotmail.com[65.54.244.40]: Connection timed out (port 25)
Mar 7 20:37:44 muthii postfix/smtp[5444]: connect to mx1.hotmail.com[65.54.245.8]: Connection timed out (port 25)
Mar 7 20:37:57 muthii postfix/smtpd[5465]: warning: 65.111.168.136: address not listed for hostname 136-168-111-65.serverpronto.com
Mar 7 20:37:57 muthii postfix/smtpd[5465]: connect from unknown[65.111.168.136]
Mar 7 20:37:57 muthii postfix/smtpd[5465]: lost connection after CONNECT from unknown[65.111.168.136]
Mar 7 20:37:57 muthii postfix/smtpd[5465]: disconnect from unknown[65.111.168.136]
Mar 7 20:38:14 muthii postfix/smtp[5444]: connect to mx1.hotmail.com[65.54.244.8]: Connection timed out (port 25)
Mar 7 20:38:44 muthii postfix/smtp[5444]: connect to mx3.hotmail.com[65.54.245.72]: Connection timed out (port 25)
Mar 7 20:39:14 muthii postfix/smtp[5444]: connect to mx3.hotmail.com[65.54.244.200]: Connection timed out (port 25)
Mar 7 20:39:44 muthii postfix/smtp[5444]: connect to mx2.hotmail.com[65.54.245.40]: Connection timed out (port 25)
Mar 7 20:39:44 muthii postfix/smtp[5444]: 8B352114BAFC: to=<samnjugu@hotmail.com>, relay=none, delay=324725, status=deferred (connect to mx2.hotmail.com[65.54.245.40]: Connection timed out)
Mar 7 20:40:05 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:40:05 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:40:07 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:40:07 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:40:08 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:40:08 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:41:09 muthii postfix/smtpd[5508]: connect from localhost.localdomain[127.0.0.1]
Mar 7 20:41:09 muthii postfix/smtpd[5508]: 33441114BB16: client=localhost.localdomain[127.0.0.1]
Mar 7 20:41:09 muthii postfix/cleanup[5510]: 33441114BB16: message-id=<36602.24.98.118.127.1173318069.squirrel@www.muthii.com>
Mar 7 20:41:09 muthii postfix/smtpd[5508]: disconnect from localhost.localdomain[127.0.0.1]
Mar 7 20:41:09 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:41:09 muthii postfix/qmgr[28754]: 33441114BB16: from=<muthii@muthii.com>, size=733, nrcpt=1 (queue active)
Mar 7 20:41:09 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:41:10 muthii postfix/smtp[5444]: 33441114BB16: to=<sam_njugu@yahoo.com>, relay=f.mx.mail.yahoo.com[209.191.88.247], delay=1, status=sent (250 ok dirdel)
Mar 7 20:41:10 muthii postfix/qmgr[28754]: 33441114BB16: removed
Mar 7 20:41:10 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:41:10 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:41:17 muthii postfix/anvil[5467]: statistics: max connection rate 1/60s for (smtp:65.111.168.136) at Mar 7 20:37:57
Mar 7 20:41:17 muthii postfix/anvil[5467]: statistics: max connection count 1 for (smtp:65.111.168.136) at Mar 7 20:37:57
Mar 7 20:41:17 muthii postfix/anvil[5467]: statistics: max cache size 1 at Mar 7 20:37:57
Mar 7 20:50:09 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:50:09 muthii dovecot: IMAP(muthii): Disconnected: Logged out
Mar 7 20:50:17 muthii dovecot: imap-login: Login: user=<muthii>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Mar 7 20:50:17 muthii dovecot: IMAP(muthii): Disconnected: Logged out

after sending a mail from squirel to my yahoo account at 20:41 i tried sending an email to myself from another acount but it doesnt show up on the log.

billymayday 03-08-2007 05:43 AM

I don't quite get why its seems to have gone to your yahoo account and not hotmail, but are you sure your firewall has port 25 open?

samnjugu 03-08-2007 11:52 AM

it seems there is a mail on postfix queue which is trying to go to hotmail i have checked my email clients and none of them has any pending mails, but according to the log postfix has been trying to send a mail to hotmail since the 4th, am thinking it must be one of the test mails i had done after installation. I will look around for a command to clear the queue to see if i can stop that. if i ran the postconf command and posted the results here would that help you spot the error in mysettings not allowing postfix to receive mail.

Thank you again for all the help

billymayday 03-08-2007 02:47 PM

Use postqueue -p to get the queue id of the job then postsuper -d job_id to delete it

Did you check your firewall settings?

samnjugu 03-08-2007 05:29 PM

yes checked my firewall and port 25 is forwarded to postfix machine.

this is the error message i got from gmail while trying so send a mail to postfix machine.
Technical details of temporary failure:
TEMP_FAILURE: Could not initiate SMTP conversation with any hosts:
[smtp.muthii.com. (5): Destination address required]

Do i need to setup an mx setting with my isp i had setup an mx setting as zone muthii.com and handled by host smtp.muthii.com. is this correct or is it unnecesary for me to do this

Thank you for your patience and continued help i appreciate it a lot.

samnjugu 03-08-2007 05:53 PM

I just did a telnet connection to make sure i can connect from outside amnd that my isp isn't blocking port 25

# telnet muthii.com 25
Trying 24.98.118.127...
Connected to muthii.com (24.98.118.127).
Escape character is '^]'.
220 muthii.com ESMTP Postfix
ehlo muthii.com
250-muthii.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250 8BITMIME
quit
221 Bye
Connection closed by foreign host.

i will try and see if i can get any more info that can be of use to you.
Just emptied the log will try send more mails to server and see if anything comes on the log.

billymayday 03-09-2007 12:59 AM

I tried to send you an email to the address in your log and here's what I got

Mar 9 17:58:06 ##### postfix/smtp[20666]: B7F89A8348: to=<muthii@muthii.com>, relay=none, delay=2, status=bounced (Host or domain name not found. Name service error for name=smtp.muthii.com type=A: Host not found)


Looks like a DNS problem

samnjugu 03-09-2007 07:08 AM

It worked finally i received a bunch of test mails i had sent to the server, i was changing my dns settings yesterday by editing my mx settings i must have changed them back to the wrong setting so i will go and play around with them and see what works coz i just sent another email and i cant see it.

Thank you very much for your help and patience. great members like you are what makes this the No.1 forum for linux users:D

farslayer 03-09-2007 07:41 AM

Well it looks like your MX record is pointed at smtp.muthii.com

Code:

Answer records
name        class        type        data        time to live
muthii.com        IN        MX       
preference:        1
exchange:        smtp.muthii.com

Yet you have no A record defined in DNS that explains where smtp.muthii.com is...

Code:

name        class        type        data        time to live
www.muthii.com        IN        CNAME        muthii.com        1175s        (19m 35s)
muthii.com        IN        A        24.98.118.127        1056s        (17m 36s)

add an A record for smtp.muthii.com
Or have your MX record point to muthii.com or www.muthii.com

samnjugu 03-18-2007 06:04 AM

Problem solved
 
thanks farslayer followed your directions its now woking like a charm


All times are GMT -5. The time now is 08:12 PM.