PDA

View Full Version : problems with mail local accounts in a fresh install


minskog
3rd July 2007, 19:40
i have a strange problem in a new server that i installed yesterday. it's debian etch and ispconfig 2.2.14, and i use the configuration from perfect setup for etch.

if i send an email from local to remote (for example gmail, yahoo, other domains) works. If i send an email from remote to local it works, but if i send from local to local accounts postfix says status="sent" but it disappears :confused:

Example:


Jul 3 17:16:30 dl20 postfix/local[4736]: 7B7661F19C:
to=<web2_minskog@dl20.myserver.com>, orig_to=<minskog@domain1.com>, relay=local, delay=19,
delays=10/0/0/8.9, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail


But this email never goes to maildir (i not use mbox and all mbox on /var/mail have size 0)

till
4th July 2007, 11:26
Please check if the email ends up in /root/Maildir/new/

minskog
4th July 2007, 12:20
yes, all are there, wtf. :confused:

minskog
4th July 2007, 14:06
what i need to check?

falko
4th July 2007, 16:55
What's the output of repquota -avug and df -h?

minskog
4th July 2007, 17:15
dl20:~# repquota -avug
dl20:~#


uppppsss blank ......



dl20:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 801M 56M 745M 7% /
/dev/hda4 110G 23G 87G 21% /usr


Edit: i disables quotas suppport on fstab and the same thing, emails dont go to user maildir .... :confused:
/dev/hda4 on /usr type reiserfs (rw,noatime,nodiratime)

falko
5th July 2007, 14:30
Please post the output of postconf -n

minskog
9th July 2007, 14:52
Please post the output of postconf -n


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command =
mailbox_size_limit = 0
mydestination = /etc/postfix/local-host-names
myhostname = dl20.domainserver.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination,check_policy_service inet:127.0.0.1:60000
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom

falko
10th July 2007, 16:20
Please run
postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
/etc/init.d/postfix restart

minskog
11th July 2007, 11:16
Please run
postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
/etc/init.d/postfix restart

Dont work, emails continues going to root maildir, it's a very strange thing :confused:

Edit: If i send from webmail, emails enter correctly

till
11th July 2007, 11:24
Please post an excerpt of your mail logfile, the content of /etc/postfix/virtusertabel and /etc/postfix/local-host-names

minskog
11th July 2007, 12:43
Please post an excerpt of your mail logfile, the content of /etc/postfix/virtusertabel and /etc/postfix/local-host-names

Log, this email is send to root maildir.

Jul 11 00:00:11 dl20 postfix/local[27412]: 6DF6321932: to=<web2_soporte@dl20.serverdomain.com>, orig_to=<soporte@domain1.com>, relay=local, delay=3.9, delays=0.02/0/0/3.8, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Jul 11 00:00:11 dl20 postfix/qmgr[27260]: 6DF6321932: removed


virtuertable

###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
webmaster@www.domain1.com web2_webmaster
web2_webmaster@www.domain1.com web2_webmaster
webmaster@domain1.com web2_webmaster
web2_webmaster@domain1.com web2_webmaster
webmaster@www.domain1.net web2_webmaster
web2_webmaster@www.domain1.net web2_webmaster
soporte@www.domain1.com web2_gonzalo
servidores@www.domain1.com web2_gonzalo
gonzalo@www.domain1.com web2_gonzalo
web2_gonzalo@www.domain1.com web2_gonzalo
soporte@domain1.com web2_gonzalo
servidores@domain1.com web2_gonzalo
gonzalo@domain1.com web2_gonzalo
web2_gonzalo@domain1.com web2_gonzalo
soporte@www.domain1.net web2_gonzalo
servidores@www.domain1.net web2_gonzalo
gonzalo@www.domain1.net web2_gonzalo
web2_gonzalo@www.domain1.net web2_gonzalo
javier@www.domain1.com web2_javier
web2_javier@www.domain1.com web2_javier
javier@domain1.com web2_javier
web2_javier@domain1.com web2_javier
javier@www.domain1.net web2_javier
web2_javier@www.domain1.net web2_javier
sergioso@www.domain1.com web2_sergio
web2_sergio@www.domain1.com web2_sergio
sergioso@domain1.com web2_sergio
web2_sergio@domain1.com web2_sergio
sergioso@www.domain1.net web2_sergio
web2_sergio@www.domain1.net web2_sergio
info@www.domain1.com web2_info
web2_info@www.domain1.com web2_info
info@domain1.com web2_info
web2_info@domain1.com web2_info
info@www.domain1.net web2_info
web2_info@www.domain1.net web2_info
monica@www.domain1.com web2_monica
web2_monica@www.domain1.com web2_monica
monica@domain1.com web2_monica
web2_monica@domain1.com web2_monica
monica@www.domain1.net web2_monica
web2_monica@www.domain1.net web2_monica
victor@www.domain1.com web2_victor
web2_victor@www.domain1.com web2_victor
victor@domain1.com web2_victor
incidencias@www.domain1.com web2_incidencias
web2_incidencias@www.domain1.com web2_incidencias
incidencias@domain1.com web2_incidencias
web2_incidencias@domain1.com web2_incidencias
incidencias@www.domain1.net web2_incidencias
web2_incidencias@www.domain1.net web2_incidencias
admin@www.domain2.com web3_webmaster
webmaster@www.domain2.com web3_webmaster
web3_webmaster@www.domain2.com web3_webmaster
admin@domain2.com web3_webmaster
webmaster@domain2.com web3_webmaster
web3_webmaster@domain2.com web3_webmaster
cjna@www.domain2.com web3_cjna
web3_cjna@www.domain2.com web3_cjna
cjna@domain2.com web3_cjna
web3_cjna@domain2.com web3_cjna
alv@alv.domain1.com web5_alv
web5_alv@alv.domain1.com web5_alv
minskog@www.minskog.net web6_minskog
web6_minskog@www.minskog.net web6_minskog
minskog@minskog.net web6_minskog
web6_minskog@minskog.net web6_minskog
publicidad@publicidad.domain1.com web8_publicidad
web8_publicidad@publicidad.domain1.com web8_publicidad
miguel@www.domain1.com web2_miguel
web2_miguel@www.domain1.com web2_miguel
miguel@domain1.com web2_miguel
web2_miguel@domain1.com web2_miguel
miguel@www.domain1.net web2_miguel
web2_miguel@www.domain1.net web2_miguel
#### MAKE MANUAL ENTRIES BELOW THIS LINE!


local-host-name

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
dl20.domainserver.com
localhost.dl20.domainserver.com
localhost.domainserver.com
localhost.localdomain
www.domain1.com
www.domain2.com
banner.domain1.com
alv.domain1.com
www.minskog.net
publicidad.domain1.com
domain1.com
domain2.com
minskog.net
www.domain1.net
domainserver.com

falko
12th July 2007, 14:55
What's in /etc/postfix/main.cf (please strip out the comments)?

Can you fetch the emails from the root account to see what exactly has been sent? Maybe it was some delivery status notification mail...

minskog
12th July 2007, 15:17
What's in /etc/postfix/main.cf (please strip out the comments)?


grep -v ^# main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
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
myhostname = dl20.serverdomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
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,check_policy_service inet:127.0.0.1:60000smtpd_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
home_mailbox = Maildir/
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names



Can you fetch the emails from the root account to see what exactly has been sent? Maybe it was some delivery status notification mail...
there are corretly emails but i see that that there are a lot os emails with this body: sendmail-msp: No such file or directory

falko
13th July 2007, 14:16
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination,check_policy_service inet:127.0.0.1:60000smtpd_tls_auth_only = no
This must go into two lines:

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination,check_policy_service inet:127.0.0.1:60000
smtpd_tls_auth_only = no

minskog
16th July 2007, 21:39
This must go into two lines:

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination,check_policy_service inet:127.0.0.1:60000
smtpd_tls_auth_only = no

There are in two lines, that was copy&paste 'feature' ;)

minskog
23rd July 2007, 11:18
If i send from blackberry or webmail works ok. If i send from email client fails :confused:

falko
24th July 2007, 14:41
You must enable "Server requires authentication." in your email client.

minskog
25th July 2007, 16:38
When i say that it fails i mean that when i send form webmail or blackberry email go to user maildir, but when i send from email client, system say sent but email dont go to user maildir :) This only happen when the emails have a from and to of local accounts.

For example:

local to gmail: works
gmail to local: works
local to local: postfix say sent but email never appear.
local webmail to local account: works
from blackberry to local: works

falko
26th July 2007, 20:35
local to local: postfix say sent but email never appear.

What's in the mail log when this happens?

minskog
27th July 2007, 14:48
I upgrade to latest ispconfig and now emails simply disappear. they dont go to root maildir anymore. But Postfix continues saying 'sent' :confused:

falko
28th July 2007, 10:57
What's the output of netstat -tap, and is Maildir enabled under Management > Server > Settings > Email?

minskog
30th July 2007, 19:31
What's the output of netstat -tap, and is Maildir enabled under Management > Server > Settings > Email?

Yes, is enabled maildir support in ispconfig.


netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:exec *:* LISTEN 1680/inetd
tcp 0 0 localhost:60000 *:* LISTEN 1513/postgrey.pid -
tcp 0 0 *:shell *:* LISTEN 1680/inetd
tcp 0 0 localhost:mysql *:* LISTEN 1465/mysqld
tcp 0 0 *:81 *:* LISTEN 8745/ispconfig_http
tcp 0 0 *:ftp *:* LISTEN 24134/proftpd: (acc
tcp 0 0 localhost:domain *:* LISTEN 8891/named
tcp 0 0 dl20.serverdomain.com:domain *:* LISTEN 8891/named
tcp 0 0 *:smtp *:* LISTEN 6682/smtpd
tcp 0 0 localhost:953 *:* LISTEN 8891/named
tcp 0 0 dl20.serverdomain.com:smtp localhost:21353 TIME_WAIT -
tcp 0 0 localhost:60000 localhost:56187 ESTABLISHED1513/postgrey.pid -
tcp 0 0 localhost:60000 localhost:56180 ESTABLISHED1513/postgrey.pid -
tcp 0 0 localhost:50516 localhost:60000 ESTABLISHED6829/smtpd
tcp 0 0 localhost:56180 localhost:60000 ESTABLISHED6682/smtpd
tcp 0 0 localhost:56187 localhost:60000 ESTABLISHED6825/smtpd
tcp 0 0 localhost:60000 localhost:50516 ESTABLISHED1513/postgrey.pid -
tcp6 0 0 *:imaps *:* LISTEN 1652/couriertcpd
tcp6 0 0 *:pop3s *:* LISTEN 1671/couriertcpd
tcp6 0 0 *:pop3 *:* LISTEN 1657/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 1635/couriertcpd
tcp6 0 0 *:www *:* LISTEN 2084/apache2
tcp6 0 0 *:ssh *:* LISTEN 1781/sshd
tcp6 0 0 *:smtp *:* LISTEN 6682/smtpd
tcp6 0 0 ip6-localhost:953 *:* LISTEN 8891/named
tcp6 0 0 *:https *:* LISTEN 2084/apache2



i discard client's connections :)

I think that problem is in postfix local queue, but i dont know what happen.

sonoracomm
30th July 2007, 21:10
Hi,

I had the very same (or quite similar) problem on a fresh Centos 5 Perfect Install and fresh ISPConfig. I tried all of the suggestions in a couple of similar threads.

I resolved the problem of mail ending up in the /root/Maildir by editing the /etc/aliases file. I removed several aliases (info, sales, support, etc.) and I also edited the last line to send roots mail to my desired admin recipient.

I then ran 'newaliases' and restarted postfix.

I am still very interested in implementing the correct solution to this problem, if this is not it. ;-)

G

till
31st July 2007, 10:29
If you had aliases for these general accounts like sales, info, etc, then removing them from the aliases file is the correct solution.

sonoracomm
31st July 2007, 17:08
Thank you, Till.

Perhaps a slight modification of the Centos 5 Perfect Install is in order?

Thanks again for ISPConfig and Howto Forge.

G

minskog
6th August 2007, 13:55
That is other problem, because if my problem was alias file then emails must be fail when I sent them from webmail or blackberry, but only fails when i send from email client from local account to local account. It's very strange. I'm 99% sure that the problem is in postfix local queue, but i can't find where is the problem/disconfiguration ...

minskog
14th March 2008, 20:05
I install today a new server with debian etch and last ispconfig and i have same problem ...

falko
15th March 2008, 19:23
What's the output of netstat -tap? Did you enable Maildir under Management > Server > Settings > Email?

minskog
18th March 2008, 12:55
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost:60000 *:* LISTEN 20677/postgrey.pid
tcp 0 0 *:mysql *:* LISTEN 1733/mysqld
tcp 0 0 *:81 *:* LISTEN 11039/ispconfig_htt
tcp 0 0 *:ftp *:* LISTEN 30440/proftpd: (acc
tcp 0 0 l105.server.com:domain *:* LISTEN 6486/named
tcp 0 0 localhost:domain *:* LISTEN 6486/named
tcp 0 0 *:smtp *:* LISTEN 21397/smtpd
tcp 0 0 localhost:953 *:* LISTEN 6486/named
tcp 3163 0 l105.server.com.:34629 stranger.gueth.net:www CLOSE_WAIT 10620/freshclam
tcp 1079 0 l105.server.com.:37344 stranger.gueth.net:www CLOSE_WAIT 10620/freshclam
tcp6 0 0 *:exec *:* LISTEN 1661/inetutils-inet
tcp6 0 0 *:imaps *:* LISTEN 1633/couriertcpd
tcp6 0 0 *:shell *:* LISTEN 1661/inetutils-inet
tcp6 0 0 *:pop3s *:* LISTEN 1657/couriertcpd
tcp6 0 0 *:pop3 *:* LISTEN 1643/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 1621/couriertcpd
tcp6 0 0 *:www *:* LISTEN 21411/apache2
tcp6 0 0 *:ssh *:* LISTEN 1904/sshd
tcp6 0 0 *:smtp *:* LISTEN 21397/smtpd
tcp6 0 0 ::1:953 *:* LISTEN 6486/named
tcp6 0 0 *:https *:* LISTEN 21411/apache2

A lot of:
tcp 0 0 l105.server.com:www x.Red-x-x-x.:35022 SYN_RECV -
tcp6 0 0 l105.server.com:www x.Red-x-x-x.:35000 ESTABLISHED21840/apache2


Is active maildir support in ispconfig.

falko
19th March 2008, 15:56
What's in /etc/postfix/main.cf?
What's in your mail log when you send an email locally?

minskog
19th March 2008, 20:40
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
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
myhostname = l105.servidor.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = l105.servidor.com, localhost.servidor.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8
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,check_policy_service inet:127.0.0.1:60000
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
home_mailbox = Maildir/
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_sender_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554
header_checks = regexp:/etc/postfix/regexp.header
body_checks = regexp:/etc/postfix/regexp.body

At mail.log, mails appears with sent :?

Mar 19 14:29:31 l105 postfix/local[19147]: C5F9F6ECF: to=<web1_minskog@l105.servidor.com>, orig_to=<minskog@domain.com>, relay=local, delay=4.5, delays=3.1/0.01/0/1.4, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)

falko
20th March 2008, 18:52
Please run
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
postconf -e 'mydestination = /etc/postfix/local-host-names'
/etc/init.d/postfix restartand try again.

minskog
21st March 2008, 13:35
Please run
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
postconf -e 'mydestination = /etc/postfix/local-host-names'
/etc/init.d/postfix restartand try again.

Done, and same result, emails are marked as sent but they disappear. :confused:

falko
22nd March 2008, 17:30
What's in web1_minskog's .procmailrc file (it's in his homedir)?

minskog
23rd March 2008, 18:25
There are any .procmailrc :?

http://farm3.static.flickr.com/2174/2354251179_8825eae81c_o.png

falko
24th March 2008, 14:03
Are you sure you're in the user's homedir? You can find out the homedir of that user in /etc/passwd.

minskog
24th March 2008, 14:57
Are you sure you're in the user's homedir? You can find out the homedir of that user in /etc/passwd.

Sorry, this user is admin then his homedir is documentroot :(


MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR

INCLUDERC=/usr/var/www/web1/user/web1_minskog/.mailsize.rc
## INCLUDERC=/usr/var/www/web1/user/web1_minskog/.quota.rc
INCLUDERC=/usr/var/www/web1/user/web1_minskog/.antivirus.rc
## INCLUDERC=/usr/var/www/web1/user/web1_minskog/.local-rules.rc
## INCLUDERC=/usr/var/www/web1/user/web1_minskog/.html-trap.rc
INCLUDERC=/usr/var/www/web1/user/web1_minskog/.spamassassin.rc
## INCLUDERC=/usr/var/www/web1/user/web1_minskog/.autoresponder.rc

falko
25th March 2008, 16:37
Please disable Antivirus and SpamAssassin. Do the mails arrive then?

minskog
26th March 2008, 23:57
Globally or only this user?

falko
27th March 2008, 17:59
You can test this for this user first.

minskog
27th March 2008, 19:36
edited: with spam and clamv disabled email goes well, but with 30 mins of delay, postfix queue is empty :?

edited 2: I have activated again both (spam and clamavd) and now it works.... but only for this account. If i create one new account don't works.

falko
28th March 2008, 15:37
Can you compare the settings, procmail recipes, etc. of the working and the non-working user?

minskog
31st March 2008, 13:39
At next day it was failing again.