LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix problems ! - can send but not receive emails. (https://www.linuxquestions.org/questions/linux-server-73/postfix-problems-can-send-but-not-receive-emails-549893/)

OzTEXS 04-29-2007 06:40 AM

Postfix problems ! - can send but not receive emails.
 
Hi All,

I am having a terrible time diagnosing my postfix server.

Firstly here is my situation;

I am running a Vmware image of Ubuntu configured with postfix, mailscanner, fetchmain etc .. I have a local network of 5 pc's with 5 usernames configured with local accounts.

each local account is user@myhostname

now i also have a dyndns account with myhostname pointing to my postfix server called myhostname. so myhostname can be seen on the internet. I have courier pop3 setup for mail retreval from a client pc.

here is my main.cf file;

Code:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mailbox_size_limit = 0
recipient_delimiter = +


#MailScanner Content Scanner
header_checks = regexp:/etc/postfix/header_checks


home_mailbox = Maildir/
mailbox_command =
mydestination = myhostname
myorigin = $mydomain
mynetworks = 192.168.112.0/24, 127.0.0.0/23
myhostname = myhostname
relayhost = external.mail.server


here is the error i get from /var/log/mail.log

Code:

Apr 29 06:55:22 tallwood MailScanner[6638]: Virus and Content Scanning: Starting
Apr 29 06:55:22 tallwood MailScanner[6638]: Requeue: 0D802A178F.B78F0 to DDC5FA196B
Apr 29 06:55:22 tallwood postfix/qmgr[11930]: DDC5FA196B: from=<external email address>, size=3036, nrcpt=1 (queue active)
Apr 29 06:55:22 tallwood MailScanner[6638]: Uninfected: Delivered 1 messages
Apr 29 06:55:23 tallwood courierpop3login: Connection, ip=[::ffff:211.30.227.156]
Apr 29 06:55:24 tallwood courierpop3login: LOGIN, user=vmadmin, ip=[::ffff:211.30.227.156]
Apr 29 06:55:24 tallwood courierpop3login: LOGOUT, user=vmadmin, ip=[::ffff:211.30.227.156], top=0, retr=0, time=0
Apr 29 06:55:33 tallwood postfix/smtp[12067]: DDC5FA196B: to=<vmadmin@localhost>, relay=mail.optusnet.com.au[211.29.132.250], delay=40, status=bounced (host mail.optusnet.com.au[211.29.132.250] said: 553 5.3.0 <vmadmin@localhost>... No such user (in reply to RCPT TO command))
Apr 29 06:55:33 tallwood postfix/cleanup[12047]: 484D1A1970: message-id=<20070429105533.484D1A1970@myhostname>
Apr 29 06:55:33 tallwood postfix/qmgr[11930]: 484D1A1970: from=<>, size=4966, nrcpt=1 (queue active)
Apr 29 06:55:33 tallwood postfix/qmgr[11930]: DDC5FA196B: removed
Apr 29 06:55:38 tallwood postfix/smtp[12067]: 484D1A1970: to=<external email address>, relay=external mail server[211.29.132.250], delay=5, status=sent (250 2.0.0 l3TBRpvd009453 Message accepted for delivery)
Apr 29 06:55:38 tallwood postfix/qmgr[11930]: 484D1A1970: removed


I can send emails out with no issues .. but i cannot receive any ? can anyone help me !

Cheers !!

farslayer 04-30-2007 03:41 PM

I hate these posts with out real DNS info..

Do you just have an A record setup ?
or did you setup both the A record and the MX record in DNS ?

myhostname is not a fqdn

The A record should be something like mail.mydomainname.com pointing to the Internet IP address of your mail server.
the MX record should reference the A record as the destination for mail delivery.

each account name should be user@mydomainname.com

Did your HOW-TO include instructions for manually sending test emails through the system by telneting to port 25 ? a good how-to should include this test info along the way..

OzTEXS 05-01-2007 12:54 AM

sorry dude .. myhostname is a FQDN tallwood.homeip.net .. i just used myhostname as a shortcut.

now what do u mean by A record setup ?

farslayer 05-01-2007 06:43 PM

Your A record is in Blue..

Quote:

default@debian:~$ dig tallwood.homeip.net

; <<>> DiG 9.4.0 <<>> tallwood.homeip.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23963
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5

;; QUESTION SECTION:
;tallwood.homeip.net. IN A

;; ANSWER SECTION:
tallwood.homeip.net. 60 IN A XXX.XX.XXX.XXX

;; AUTHORITY SECTION:
homeip.net. 64844 IN NS ns5.dyndns.org.


;; ADDITIONAL SECTION:
ns1.dyndns.org. 13152 IN A 63.208.196.90


;; Query time: 63 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Tue May 1 19:37:29 2007
;; MSG SIZE rcvd: 233
but when I query the MX record for that domain I get NO answer...
an MX record is required in order to receive email

Quote:

default@debian:~$ dig tallwood.homeip.net MX

; <<>> DiG 9.4.0 <<>> tallwood.homeip.net MX
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50566
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;tallwood.homeip.net. IN MX

;; AUTHORITY SECTION:
homeip.net. 600 IN SOA ns1.dyndns.org. hostmaster.dyndns.org. 2268515311 600 300 604800 600

;; Query time: 62 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Tue May 1 19:37:40 2007
;; MSG SIZE rcvd: 98
A Address, code 1. Used for storing an IP address (specifically, an IPv4 32-bit address) associated with a domain name. Defined in RFC 1035. ftp://ftp.is.co.za/rfc/rfc1035.txt

MX Mail Exchanger, code 15. Each MX record specifies a domain name (which must have an A record associated with it) and a priority; a list of mail exchangers is then ordered by priority when delivering mail. MX records provide one level of indirection in mapping the domain part of an email address to a list of host names which are meant to receive mail for that domain name. Critical part of the infrastructure used to support SMTP email. Defined in RFC 1035.

OzTEXS 05-02-2007 12:55 AM

excellent reply farslayer .. i will investigate accordingly.

thanks !

OzTEXS 05-02-2007 01:11 AM

ok then .. if i add a valid mail rely to my dyndns account under the Mail Exchanger section .. will this do the trick ?

farslayer 05-02-2007 08:06 PM

a MX record will tell other mail servers that are sending email to oztexs@tallwood.homeip.net that the mail server that handles mail for that user/domain resides at the A record address associated with that MX record.

Without the MX record anyone trying to send mail to your domain will not be able to because they will not find a server configured to receive it..

OzTEXS 05-03-2007 01:55 AM

ok so my smtp server should be the mx .. mail.tallwood.homeip.net ?

farslayer 05-03-2007 09:02 PM

correct.
and there should also be an A record for that server..

the MX record will point to the server name mail.tallwood.homeip.net
the A record will contain the IP address for mail.tallwood.homeip.net
an MX record should never point directly at an IP address.

also make sure the hostname for the actual machine matches the record you are putting into DNS.
Here is a guide you can use to ensure the computer hostname is set properly. http://www.cpqlinux.com/hostname.html

OzTEXS 05-05-2007 08:06 AM

thanks mate !!

all good.


All times are GMT -5. The time now is 06:22 AM.