[SOLVED] Mail problem

10 posts / 0 new
Last post
#1 Tue, 09/10/2013 - 02:22
just_me

[SOLVED] Mail problem

Got two virtualmin servers, both are real root servers, both have the same UBUNTU version and same installation of virtualmin. Config files are identical. Only one difference: Box one has SSL for mail and Box two hasn't.

So Box two receives Mails, but does not deliver them to the user's mailbox, but can send mail. Box one can send and receive mail.

As of Maillogfile Box two receives the mail, hands them over to procmail and then it is lost somewhere. The config files of procmail are identical on both boxes, so i am a little confused where to check now. The Spamassassin settings are identical, dovecot too. Postfix differ a little bit due to the SSL thing.

I found out, that Spamassassin hasn't been set up for that virtual server, so i activated that and deleted the user, who didn't have a spam folder and entered him again. Now he has got a spamfolder, but doesn't receive mails... The mails seem to be deleted by the system, so what to do?

Thanks for help.

Best

Tue, 09/10/2013 - 08:15
andreychek

Howdy,

Hmm, having SSL enabled shouldn't affect email delivery... it sounds like something there may be something else going on that's causing the issue you're seeing.

On the server that's not delivering email, what is the output of "postconf -n"?

Also, since you're seeing the email being handed over to procmail-wrapper, the next thing to do would be to review the procmail log in /var/log/procmail.log.

-Eric

Tue, 09/10/2013 - 08:41
Locutus

Procmail should indicate in its logs to which directory it delivers the mail, or if there was an error trying to do so. Maybe it is putting the mail into an incorrect directory, or your Dovecot is looking in the wrong place for the mail.

Additionally, I can offer - for a moderate fee - to take a look at your system/logfiles/etc. myself and try to find out where your mail is going. :)

Tue, 09/10/2013 - 12:10
just_me
From info@example.com  Tue Sep 10 12:03:10 2013
Subject: Test
  Folder: /usr/bin/spamassassin    1778
Time:1378807391 From:info@example.com To:test@test.org User:test.test.org Size:1778 Dest:/usr/bin/spamassassin Mode:None

Hmmm. So what?

Am a little confused. The rules of procmail are identical:

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0
* ?/usr/bin/test "$EXITCODE" = "73"
/dev/null
EXITCODE=0
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
:0
| /usr/bin/spamassassin
:0wf
* X-Spam-Status: Yes
$HOME/spam
DROPPRIVS=yes
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
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_ciphers = high
smtpd_tls_security_level = may
virtual_alias_maps = hash:/etc/postfix/virtual

Best and thanks for help.

Tue, 09/10/2013 - 12:21
Locutus

That's odd, you shouldn't be seeing "spamassassin" as a destination folder in your procmail log. That's certainly the indication that your mails vanished.

Can you post the contents of one of the files in /etc/webmin/virtual-server/procmail please? And please alwayas enclose screen dumps in [code][/code] tags, so that linebreaks and monospace font are preserved.

An example what the file should look like if you have spam filtering and virus filtering enabled, and have it set to put spam messages in a "spam" folder:

DROPPRIVS=yes
:0cw
| /etc/webmin/virtual-server/clam-wrapper.pl /usr/bin/clamdscan
VIRUSMODE=1
:0e
/dev/null
VIRUSMODE=0
:0fw
| /usr/bin/spamc
SPAMMODE=1
:0
* ^X-Spam-Status: Yes
$HOME/Maildir/.spam/
SPAMMODE=0
Tue, 09/10/2013 - 12:27
just_me
DROPPRIVS=yes
:0fw
| /usr/bin/spamc
SPAMMODE=1
:0
* ^X-Spam-Status: Yes
$HOME/Maildir/.spam/
SPAMMODE=0
Tue, 09/10/2013 - 12:34
Locutus

Okay, reading through your non-line-broken procmailrc again, there seems to be a problem. The 5 last lines read like so:

DEFAULT=$HOME/Maildir/ 
:0 | /usr/bin/spamassassin
:0wf * X-Spam-Status: Yes 
$HOME/spam 
DROPPRIVS=yes

while they should just read

DEFAULT=$HOME/Maildir/ 
DROPPRIVS=yes

SpamAssassin is called from the virtual server's individually included procmailrc, as you've seen in the previous post, not from the global one. I don't know where this call to "spamassassin" is coming from for you, maybe a remainder from previous configurations, but you can try simply deleting these extraneous lines.

Tue, 09/10/2013 - 12:45
just_me

it is the same on both servers:

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0
* ?/usr/bin/test "$EXITCODE" = "73"
/dev/null
EXITCODE=0
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
:0
| /usr/bin/spamassassin
:0wf
* X-Spam-Status: Yes
$HOME/spam
DROPPRIVS=yes
Tue, 09/10/2013 - 13:06
andreychek

Howdy,

The procmailrc should never be piping email into spamassassin... why it works on the one server I can't say, but neither should be like that :-)

You should comment out the following lines at the end:

:0
| /usr/bin/spamassassin
:0wf
* X-Spam-Status: Yes
$HOME/spam
Wed, 09/11/2013 - 01:22
just_me

I really do not know, why this is working on the other server, but i commented out that lines, now it works. Thank you very much, this made my head ache for several days now; but finally it all runs perfectly now.

Thanks for help! ;-) Best

Topic locked