HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Can send but not receive emails (Ubuntu 7.10) (http://www.howtoforge.com/forums/showthread.php?t=16639)

chillifire 27th October 2007 22:39

Can send but not receive emails (Ubuntu 7.10)
 
Hi,

I have followed the Howto for a perfect server Ubuntu 7.10 and have installed ispconfig on top of it (plus ZEND Optimiser and ioncube loader).
Let me thank at this point the authors of these instructions for their phantastic work and dedication to the subject. Althought truely not new to computers (yes, I coded in assembler a VERY long time ago) I am certainly new to LINUX and server configuration. This allowed me to get through the install in give or take a day. Thanks again.

Now it I have an issue with receiving emails and it appears I have a few issues with DNS. I can send emails allright, but I receive nothing. There is however no message coming back telling me the email address cannot be reached (as it can). But it ends up, it seems, - nowhere. In ispconfig all services are showing 'ONLINE' status.

Here some details on my setup:

/etc/hosts
127.0.0.1 localhost.localdomain localhost
210.48.62.11 finch.chillifire.net finch

#The following lines are desireable for IPv6 capability]
::1 ip6-localhost ip6-loopback finch.chillifire.net
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:rsync *:* LISTEN 384/rsync
tcp 0 0 *:mysql *:* LISTEN 30353/mysqld
tcp 0 0 *:81 *:* LISTEN 6981/ispconfig_http
tcp 0 0 finch.chillifire:domain *:* LISTEN 29731/named
tcp 0 0 localhost.locald:domain *:* LISTEN 29731/named
tcp 0 0 *:smtp *:* LISTEN 30351/master
tcp 0 0 localhost.localdoma:953 *:* LISTEN 29731/named
tcp6 0 0 *:imaps *:* LISTEN 27531/couriertcpd
tcp6 0 0 *:pop3s *:* LISTEN 27438/couriertcpd
tcp6 0 0 *:rsync *:* LISTEN 384/rsync
tcp6 0 0 *:pop3 *:* LISTEN 27371/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 27474/couriertcpd
tcp6 0 0 *:www *:* LISTEN 25280/apache2
tcp6 0 0 *:ftp *:* LISTEN 7695/proftpd: (acce
tcp6 0 0 *:ssh *:* LISTEN 3879/sshd
tcp6 0 0 *:smtp *:* LISTEN 30351/master
tcp6 0 0 ip6-localhost:953 *:* LISTEN 29731/named
tcp6 0 0 *:https *:* LISTEN 25280/apache2
tcp6 0 2076 finch.chillifire.ne:ssh 60-234-129-51.bit:51916 ESTABLISHED28235/0
getnameinfo failed
tcp6 0 744 finch.chillifire.ne:ssh [UNKNOWN]:56821 ESTABLISHED30556/sshd: [accept

pri.chillifire.net
$TTL 86400
@ IN SOA ns.chillifire.net. admin.chillifire.net. (
2007102711 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS ns.chillifire.net. ; Inet Address of name server 1
NS 210.55.30.67. ; Inet Address of name server 2
;

mail MX 10 mail.chillifire.net.

chillifire.net. A 210.48.62.11
mail A 210.48.62.11
ns A 210.48.62.11
www A 210.48.62.11
finch A 210.48.62.11
localhost A 127.0.0.1

chillifire.net. TXT "v=spf1 a mx ptr ~all"

;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;


/etc/postfix/main.cf
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
# myorigin = /etc/mailname

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

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.chillifire.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mail.chillifire.net, finch.chillifire.net, localhost.chillifire.net, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8, 210.48.62.11
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom


Can anyone make sense out of that?
There seems to be also an issue regarding ssh with finch.chillifire.net, the FQDN (see netstat output). Any hints on that? May this be rlated issues?

Any input is welcome.

till 28th October 2007 12:16

Please add the lines:

virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names

At the end of the file /etc/postfix/main.cf and restart postfix. If mail deliver still does not work, have a look at the mail log file:

/var/log/mail.log

You can get the last 100 lines of the file with:

tail -n 100 /var/log/mail.log

chillifire 29th October 2007 06:45

Hi,

thank you for your reply.

I have added the two lines (see appendix). Still no scuccess.
The log looks like this after restart and an attempt to logon and retrieve mail with UEBIMIAU webmail:

Oct 29 05:22:33 finch postfix/master[30255]: terminating on signal 15
Oct 29 05:22:33 finch postfix/master[30485]: daemon started -- version 2.4.5, configuration /etc/postfix
Oct 29 05:24:34 finch courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Oct 29 05:24:34 finch courierpop3login: LOGIN, user=web6_admin, ip=[::ffff:127.0.0.1]
Oct 29 05:24:34 finch courierpop3login: LOGOUT, user=web6_admin, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=12, sent=88, time=0

By the way, I noticed, that in the local-host-names there was everything in there that has a DNS A record - with exception of mail.chillinet.net. Does that matter? Well, I added it in for good measure - still no improvement...

Interesting thought: The log above shows 12 received but 0 retrieved. Not sure what 'top' or 'time' means. Any further suggestions?

Beste Gruesse



Appendix

/etc/postfix/main.cf
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
# myorigin = /etc/mailname

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

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.chillifire.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mail.chillifire.net, finch.chillifire.net, localhost.chillifire.net, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8, 210.48.62.11
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names

till 29th October 2007 08:27

The mail log lines that you posted does not contain a line about a mail delivery or even a mail delivery attempt. It looks like the email never reaches your server. Please install one of the webmail pacakes for ISPConfig and send a email to a local account with webmail on your ispconfig server.

chillifire 29th October 2007 10:27

VERY interesting
 
Hi till,
thanks agins for your reply. I see now what you mean. I now sent an email from UEBIMIAU webmail
from admin@chillifire.net
to admin@chillifire.net.nz
cc admin@chillifire.co.nz
cc admin@chillifire.net (which forwards it to hanno.schupp@gmail.com)

and what I got in the log for that was this:

Oct 29 09:08:21 finch postfix/smtpd[2086]: connect from localhost.localdomain[127.0.0.1]
Oct 29 09:08:21 finch postfix/smtpd[2086]: 71EA13822D: client=localhost.localdomain[127.0.0.1]
Oct 29 09:08:21 finch postfix/cleanup[2090]: 71EA13822D: message-id=<20071029090821.71EA13822D@mail.chillifire.net>
Oct 29 09:08:21 finch postfix/smtpd[2086]: disconnect from localhost.localdomain[127.0.0.1]
Oct 29 09:08:21 finch postfix/qmgr[30805]: 71EA13822D: from=<web6_admin@chillifire.net>, size=818, nrcpt=3 (queue active)
Oct 29 09:08:21 finch courierpop3login: Connection, ip=[::ffff:127.0.0.1]
Oct 29 09:08:21 finch courierpop3login: LOGIN, user=web6_admin, ip=[::ffff:127.0.0.1]
Oct 29 09:08:21 finch courierpop3login: LOGOUT, user=web6_admin, ip=[::ffff:127.0.0.1], top=0, retr=0, rcvd=6, sent=30, time=0
Oct 29 09:08:21 finch postfix/pickup[1860]: E4C843823B: uid=10010 from=<web7_admin>
Oct 29 09:08:21 finch postfix/local[2094]: 71EA13822D: to=<web6_admin@finch.chillifire.net>, orig_to=<admin@chillifire.net>, relay=local, delay=0.49, delays=0.12/0.03/0/0.34, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:21 finch postfix/cleanup[2126]: E602F3823C: message-id=<20071029090821.71EA13822D@mail.chillifire.net>
Oct 29 09:08:21 finch postfix/cleanup[2090]: E4C843823B: message-id=<20071029090821.E4C843823B@mail.chillifire.net>
Oct 29 09:08:21 finch postfix/qmgr[30805]: E4C843823B: from=<web7_admin@finch.chillifire.net>, size=391, nrcpt=1 (queue active)
Oct 29 09:08:21 finch postfix/qmgr[30805]: E602F3823C: from=<web6_admin@chillifire.net>, size=964, nrcpt=1 (queue active)
Oct 29 09:08:21 finch postfix/local[2094]: 71EA13822D: to=<web6_admin@finch.chillifire.net>, orig_to=<admin@chillifire.net>, relay=local, delay=0.55, delays=0.12/0.03/0/0.39, dsn=2.0.0, status=sent (forwarded as E602F3823C)
Oct 29 09:08:21 finch postfix/pickup[1860]: F169238239: uid=10009 from=<web6_admin>
Oct 29 09:08:21 finch postfix/cleanup[2090]: F169238239: message-id=<20071029090821.F169238239@mail.chillifire.net>
Oct 29 09:08:22 finch postfix/qmgr[30805]: F169238239: from=<web6_admin@finch.chillifire.net>, size=391, nrcpt=1 (queue active)
Oct 29 09:08:22 finch postfix/pickup[1860]: 0E78938238: uid=10011 from=<web8_admin>
Oct 29 09:08:22 finch postfix/cleanup[2126]: 0E78938238: message-id=<20071029090822.0E78938238@mail.chillifire.net>
Oct 29 09:08:22 finch postfix/local[2094]: F169238239: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.23, delays=0.21/0/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:22 finch postfix/qmgr[30805]: F169238239: removed
Oct 29 09:08:22 finch postfix/local[2133]: E4C843823B: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.24, delays=0.14/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:22 finch postfix/qmgr[30805]: E4C843823B: removed
Oct 29 09:08:22 finch postfix/qmgr[30805]: 0E78938238: from=<web8_admin@finch.chillifire.net>, size=391, nrcpt=1 (queue active)
Oct 29 09:08:22 finch postfix/local[2094]: 0E78938238: to=<admispconfig@localhost.localdomain>, relay=local, delay=0.33, delays=0.32/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:22 finch postfix/qmgr[30805]: 0E78938238: removed
Oct 29 09:08:25 finch postfix/smtp[2134]: E602F3823C: to=<hanno.schupp@gmail.com>, orig_to=<admin@chillifire.net>, relay=gmail-smtp-in.l.google.com[209.85.199.27]:25, delay=3.2, delays=0.04/0.07/0.94/2.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1193648905 f28si12213201rvb)
Oct 29 09:08:25 finch postfix/qmgr[30805]: E602F3823C: removed
Oct 29 09:08:33 finch postfix/local[2092]: 71EA13822D: to=<web8_admin@finch.chillifire.net>, orig_to=<admin@chillifire.net.nz>, relay=local, delay=12, delays=0.12/0.03/0/11, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:33 finch postfix/local[2095]: 71EA13822D: to=<web7_admin@finch.chillifire.net>, orig_to=<admin@chillifire.co.nz>, relay=local, delay=12, delays=0.12/0.03/0/11, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Oct 29 09:08:33 finch postfix/qmgr[30805]: 71EA13822D: removed

And the email was truely received in all three mailboxes of admin@chillifire.net, admin@chillifire.net.nz, cc admin@chillifire.co.nz plus the external mailbox hanno.schupp@gmail.com. But still I cannot send to admin@chillifire.net

Now here is the next gag:
I received warning messages for all test messages I sent the previous day to admin@chillifire.net from my gmail account. The message body reads as follows:

This is an automatically generated Delivery Status Notification

THIS IS A WARNING MESSAGE ONLY.

YOU DO NOT NEED TO RESEND YOUR MESSAGE.

Delivery to the following recipient has been delayed:

admin@chillifire.net

Message will be retried for 2 more day(s)

Technical details of temporary failure:
TEMP_FAILURE: Could not initiate SMTP conversation with any hosts:
[mail.chillifire.net. (10): Destination address required]

So there seems to be connection problem to the SMTP server of some kind.

Please stick with me. I am getting slightly desperate :)

Gruesse

Hanno

chillifire 30th October 2007 07:54

Is DNS the problem?
 
Guys,

I am wondering whether or not DNS is the problem. I can ping www.chillifire.net allright, but I cannot ping finch.chillifire.net, ns.chillifire.net, and mail.chillifire.net. But have a look again at my DNS configuration of ISPconfig again (below). There are A records for all of those host names. Should I not be able to ping them therefore? and how if it cannot be pinged, is the mail delivery to mail.chillifire.net going to work? Again, is there something wrong with DNS?

Your thoughts?

Cheers

Hanno

till 30th October 2007 12:01

Are you sure that your ISPConfig DNS-Server is the authoritive nameserver for chillifire.net?

chillifire 15th December 2007 21:35

Solved
 
I have now set up two nameservers for chillifire.net (ns1 and ns2), which are 'bootstrapped' by chillifire.org and its ns DNS entries at godaddy.com.

Now that the DNS set up works email is fine.

Thanks for your support.


All times are GMT +2. The time now is 12:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.