HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Mailserver / Postfix Problems (http://www.howtoforge.com/forums/showthread.php?t=1217)

oaky 11th November 2005 11:03

Mailserver / Postfix Problems
 
First I followed the http://www.howtoforge.com/virtual_po..._quota_courier Howto.

I had to solve a "small" problem with the mysql access, -> http://www.howtoforge.com/forums/sho...=6190#post6190.

and now I stuck (I think so ???) with a general mailserver problem.

I think my mailserver doesn't accept mails... and because of this I cannot activate my accounts.

mail.log
Code:

Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 8EF23334E0: from=<michael.eichriedler@aon.at>, size=1031, nrcpt=1 (queue active)
Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 8EF23334E0: to=<office@m34s12.vlinux.de>, relay=none, delay=3888, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)
Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 420B4334C5: from=<root@m34s12.vlinux.de>, size=624, nrcpt=1 (queue active)
Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 420B4334C5: to=<root@m34s12.vlinux.de>, orig_to=<root>, relay=none, delay=11836, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)
Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 4757A334C7: from=<root@m34s12.vlinux.de>, size=624, nrcpt=1 (queue active)
Nov 11 09:42:17 m34s12 postfix/qmgr[22811]: 4757A334C7: to=<root@m34s12.vlinux.de>, orig_to=<root>, relay=none, delay=11236, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)
Nov 11 09:45:02 m34s12 postfix/pickup[22810]: 90521334F1: uid=0 from=<root>
Nov 11 09:45:03 m34s12 postfix/cleanup[29056]: 90521334F1: message-id=<20051111094502.90521334F1@m34s12.vlinux.de>
Nov 11 09:45:03 m34s12 postfix/qmgr[22811]: 90521334F1: from=<root@m34s12.vlinux.de>, size=624, nrcpt=1 (queue active)
Nov 11 09:45:03 m34s12 amavis[18694]: DENIED ACCESS from IP 83.151.31.46
Nov 11 09:45:03 m34s12 postfix/smtp[29078]: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting (port 10024)
Nov 11 09:45:03 m34s12 postfix/smtp[29078]: 90521334F1: to=<root@m34s12.vlinux.de>, orig_to=<root>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)

As you can see in the log, I tried to send a mail from michael@### to office@### to activate the office account.
But what are these "root-mails" , as you get now, I am new in Linux...

So probably it's a simple problem and somebody can help me...

Michael

falko 11th November 2005 11:45

It seems as if Postfix is running a bit unstable on 127.0.0.1.:confused:
Please post /etc/postfix/main.cf and the output of
Code:

netstat -tap
here.

oaky 11th November 2005 11:50

/etc/postfix/main.cf

Code:

smtpd_banner =  ESMTP  (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = m34s12.vlinux.de
mydomain = m34s12.vlinux.de
mydestination = localhost, localhost.localdomain
mynetworks = 127.0.0.0/8
alias_maps =
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
myorigin = /etc/mailname
relayhost =
inet_interfaces = all
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes

netstat -tap

Code:

Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name
tcp        0      0 m34s12.vlinux.de:imaps  *:*                    LISTEN    1843/couriertcpd
tcp        0      0 m34s12.vlinux.de:pop3s  *:*                    LISTEN    1426/couriertcpd
tcp        0      0 m34s12.vlinux.de:10024  *:*                    LISTEN    1815/amavisd (maste
tcp        0      0 m34s12.vlinux.de:10025  *:*                    LISTEN    18678/master
tcp        0      0 m34s12.vlinux.de:mysql  *:*                    LISTEN    4355/mysqld
tcp        0      0 m34s12.vlinux.de:pop3  *:*                    LISTEN    18272/couriertcpd
tcp        0      0 m34s12.vlinux.de:imap2  *:*                    LISTEN    18560/couriertcpd
tcp        0      0 m34s12.vlinux.de:www    *:*                    LISTEN    409/apache
tcp        0      0 m34s12.vlinux.de:ftp    *:*                    LISTEN    7311/inetd
tcp        0      0 m34s12.vlinux.de:ssh    *:*                    LISTEN    7548/sshd
tcp        0      0 m34s12.vlinux.de:smtp  *:*                    LISTEN    18678/master
tcp        0      0 m34s12.vlinux.de:mysql  localhost:50854        ESTABLISHED4355/mysqld
tcp        0      0 localhost:50854        m34s12.vlinux.de:mysql  ESTABLISHED7415/proxymap
tcp        0      0 m34s12.vlinux.de:10024  m34s12.vlinux.de:50858  TIME_WAIT  -
tcp        0    480 m34s12.vlinux.de:ssh    M078P026.adsl.hig:65255 ESTABLISHED26835/16
tcp        0      0 m34s12.vlinux.de:ssh    M160P030.adsl.hig:65277 ESTABLISHED12435/5


I had syscp preinstalled on my debian sarge system.

I deinstalled it because I wanted a more transparent system.

Probably this is the source of all the problems....

falko 11th November 2005 18:26

There seem to be missing a few lines (e.g. proxy_read_maps) in /etc/postfix/main.cf that are in the tutorial ( http://www.howtoforge.com/virtual_po...ota_courier_p2 ). Please run

Code:

postconf -e 'mynetworks = 127.0.0.0/8'
postconf -e 'virtual_alias_domains ='
postconf -e ' virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf'
postconf -e 'virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf'
postconf -e 'virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf'
postconf -e 'virtual_mailbox_base = /home/vmail'
postconf -e 'virtual_uid_maps = static:5000'
postconf -e 'virtual_gid_maps = static:5000'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/smtpd.cert'
postconf -e 'smtpd_tls_key_file = /etc/postfix/smtpd.key'
postconf -e 'transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf'
postconf -e 'virtual_create_maildirsize = yes'
postconf -e 'virtual_mailbox_extended = yes'
postconf -e 'virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf'
postconf -e 'virtual_mailbox_limit_override = yes'
postconf -e 'virtual_maildir_limit_message = "The user you are trying to reach is over quota."'
postconf -e 'virtual_overquota_bounce = yes'
postconf -e 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps'

and restart Postfix.

oaky 12th November 2005 10:34

I inserted the missing lines and restarted postfix with /etc/init.d/postfix restart.

/etc/postfix/main.cf

Code:

smtpd_banner =  ESMTP  (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = m34s12.vlinux.de
mydomain = m34s12.vlinux.de
mydestination = localhost, localhost.localdomain
mynetworks = 127.0.0.0/8
alias_maps =
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
myorigin = /etc/mailname
relayhost =
inet_interfaces = all
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

tail of /var/log/mail.info

Code:

Nov 12 09:25:39 m34s12 postfix/smtpd[16619]: connect from warsl404pip7.highway.telekom.at[195.3.96.91]
Nov 12 09:25:40 m34s12 postfix/smtpd[16619]: 04C4333612: client=warsl404pip7.highway.telekom.at[195.3.96.91]
Nov 12 09:25:40 m34s12 postfix/cleanup[16449]: 04C4333612: message-id=<20051112092539.04C4333612@m34s12.vlinux.de>
Nov 12 09:25:40 m34s12 postfix/qmgr[333]: 04C4333612: from=<michael.eichriedler@aon.at>, size=1031, nrcpt=1 (queue active)
Nov 12 09:25:40 m34s12 amavis[6817]: DENIED ACCESS from IP 83.151.31.46
Nov 12 09:25:40 m34s12 postfix/smtp[16499]: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting (port 10024)
Nov 12 09:25:40 m34s12 postfix/smtp[16499]: 04C4333612: to=<office@m34s12.vlinux.de>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)
Nov 12 09:25:40 m34s12 postfix/smtpd[16619]: disconnect from warsl404pip7.highway.telekom.at[195.3.96.91]

But it looks like there has nothing changed. :(

falko 12th November 2005 14:48

Quote:

Nov 12 09:25:40 m34s12 postfix/smtp[16499]: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting (port 10024)
Nov 12 09:25:40 m34s12 postfix/smtp[16499]: 04C4333612: to=<office@m34s12.vlinux.de>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)
Seems to be a problem with amavisd which runs on port 10024... Can you see that amavisd is running when you execute
Code:

ps aux
or
Code:

netstat -tap
?
Please compare your configuration with the amavisd part of the tutorial and check if there are differences...

oaky 14th November 2005 15:45

I checked the amavisd configuration...

changed the following lines in /etc/init.d/saslauthd (I had an preinstalled debian ) from:

Code:

PWDIR=/var/run/saslauthd
PIDFILE="/var/run/${NAME}/saslauthd.pid"

to:

Code:

PWDIR="/var/spool/postfix/var/run/${NAME}"
PIDFILE="${PWDIR}/saslauthd.pid"
dir="root sasl 755 ${PWDIR}"

ps aux

Code:

amavis    7511  0.0  0.5 18116 5204 ?        Ss  14:33  0:00 amavisd (master)
amavis    7512  0.0  1.0 18116 10080 ?      S    14:33  0:00 amavisd (virgin child)
amavis    7513  0.0  0.3 18116 3008 ?        S    14:33  0:00 amavisd (virgin child)
amavis    7514  0.0  0.3 18116 3008 ?        S    14:33  0:00 amavisd (virgin child)
amavis    7515  0.0  0.3 18116 3008 ?        S    14:33  0:00 amavisd (virgin child)

netstat -tap

Code:

tcp        0      0 m34s12.vlinux.de:10024  *:*                    LISTEN    -
but...
Code:

Nov 14 14:33:57 m34s12 amavis[7511]: Found $zoo        at /usr/bin/zoo
Nov 14 14:33:57 m34s12 amavis[7511]: Found $cpio      at /bin/cpio
Nov 14 14:33:57 m34s12 amavis[7511]: Using internal av scanner code for (primary) Clam Antivirus-clamd
Nov 14 14:33:57 m34s12 amavis[7511]: Found secondary av scanner Clam Antivirus - clamscan at /usr/bin/clamscan
Nov 14 14:34:38 m34s12 postfix/smtpd[7606]: connect from alma.fh-salzburg.ac.at[193.170.110.13]
Nov 14 14:34:38 m34s12 postfix/smtpd[7606]: EA60032ECB: client=alma.fh-salzburg.ac.at[193.170.110.13]
Nov 14 14:34:39 m34s12 postfix/cleanup[7613]: EA60032ECB: message-id=<2880.10.40.42.101.1131980335.squirrel@webmail.fh-salzburg.ac.at>
Nov 14 14:34:39 m34s12 postfix/qmgr[4002]: EA60032ECB: from=<meichriedler.tks2002@fh-salzburg.ac.at>, size=2469, nrcpt=1 (queue active)
Nov 14 14:34:39 m34s12 postfix/smtpd[7606]: disconnect from alma.fh-salzburg.ac.at[193.170.110.13]
Nov 14 14:34:39 m34s12 postfix/qmgr[4002]: EA60032ECB: to=<office@m34s12.vlinux.de>, relay=none, delay=1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: server dropped connection without sending the initial SMTP greeting)


oaky 15th November 2005 09:25

It is definitly a problem with amavis!

I deactivated amavis and everything works fine....

falko 15th November 2005 09:58

That's strange...:confused: Might be because it is a pre-installed Debian. You never know what you get when someone else installs a system for you...

oaky 15th November 2005 10:06

...thanks a lot!

I will try to get also amavis running, but for now I am happy with this...:)


All times are GMT +2. The time now is 16:19.

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