Hey all.
I wasn't involved with the initial install of the server and have joined in late as a hope to fix these issues they're having. I unfortunately can't figure it out.
The server is a VPS server hosted at rocketvps and the domain name is hosted at godaddy. when they set up the server they set it up with a subdomain (server1) that didn't exist and used it as the host name.
hostnameserver1.halocommunity.com
Now I can't for the life of me get the darn emails to work. the server can send emails no problem but when one is sent to the server you're returned with:
This is the mail system at host server1.halocommunity.com.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<james.halocommunity@/etc/mailname> (expanded from james@halocommunity.com): bad address syntax
Final-Recipient: rfc822; james.halocommunity@/etc/mailname Original-Recipient: rfc822;james@halocommunity.com Action: failed Status: 5.1.3 Diagnostic-Code: X-Postfix; bad address syntax
Any help would be wonderful.
Howdy,
Could you post the output of the command "postconf -n"?
Also, does "server1.halocommunity.com" show up in your /etc/hosts file, and is the IP is lists correct?
-Eric
Hey Eric,
/]# postconf -n
Auto-generated hostname. Please do not remove this comment.alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, server1.halocommunity.com
myorigin = /etc/mailname
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
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
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
173.245.7.238 server1.halocommunity.com server1
Thanks, James
Howdy,
Okay, a few thoughts --
You may want to comment out the "myorigin" line in /etc/postfix/main.cf, that can sometimes cause problems.
Also, it doesn't look like there's a DNS 'A' record for the hostname 'server1.halocommunity.com' -- you might want to add an 'A' record for that in the 'halocommunity.com' Virtual Server.
After you do all that, restart Postfix (with "/etc/init.d/postfix restart"), and then go into System Settings -> Re-Check Config.
Does it notice any problems during the Re-Check Config?
If not, try sending mail again and see if that works properly for you.
-Eric
Hey Eric,
Thanks for your suggestions I have done them and sadly it hasn't helped.
Final-Recipient: rfc822; james.halocommunity@/etc/mailname Original-Recipient: rfc822;james@halocommunity.com Action: failed Status: 5.1.3 Diagnostic-Code: X-Postfix; bad address syntax
is the @/etc/mailname an issue at all?
Yeah I'm not really sure what that @/etc/mailname is, I was hoping commenting out the myorigin line would help with that :-)
What if you run this command, what output do you receive:
grep james.halocommunity /etc/postfix/virtual
/]# grep james.halocommunity /etc/postfix/virtual
james@halocommunity.com james.halocommunity
Hmm, that looks good. How about your /etc/procmailrc file, could you post the contents of that?
-Eric
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
}
DEFAULT=/var/mail/$LOGNAME
ORGMAIL=/var/mail/$LOGNAME
DROPPRIVS=yes
:0
$DEFAULT
Out of curiosity, is it just one particular user having this problem, or do you get that error emailing any user?
I do see one issue in your procmailrc, though I don't know that I'd expect it to cause the error you're seeing.
However, it appears to be configured to deliver mail to /var/mail, rather than $HOME. And Dovecot, by default, would be configured to retrieve mail out of $HOME.
So, if no ones email is currently working, you might want to change these two lines in your /etc/procmailrc file:
DEFAULT=/var/mail/$LOGNAME
ORGMAIL=/var/mail/$LOGNAME
To read as follows:
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
After that, does that make a difference in email delivery?
-Eric
No emails are working.
I will try what you have suggested though.
Did a double check:
Final-Recipient: rfc822; testuser.halocommunity@/etc/mailname Original-Recipient: rfc822;testuser@halocommunity.com Action: failed Status: 5.1.3 Diagnostic-Code: X-Postfix; bad address syntax
Just to make sure all those changes are active, can you paste in the current output of "postconf -n"?
Also, what is the output of this command (as I'm not really sure where that "/etc/mailname" is coming from):
grep mailname /etc/postfix/*
/]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, server1.halocommunity.com
myorigin = /etc/mailname
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
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
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtuall
and
/]# grep mailname /etc/postfix/* /etc/postfix/main.cf:myorigin = /etc/mailname
I'm noticing two things there --
That option can cause some problems, so I'd actually suggest leaving it commented out for the time being.
It reads as follows:
virtual_alias_maps = hash:/etc/postfix/virtuall
There's an extra 'l' character at the end of that -- and that could certainly cause some problems :-)
Is that just a copy and paste problem? Or is that a typo in the config file?
-Eric
I'll look into these now.
I apparently missed one of the lines to comment out and the virtual alias map must be a copy paste error as it's right in the file.
Okay after commenting out that last origin line. I am no longer getting emails back saying it didn't work but I am also not getting the email in the account when I check via webmail
Okay, that sounds like we're getting somewhere :-)
I'd recommend reviewing your email logs, either /var/log/maillog or /var/log/mail.log, to see if anything unusual is showing up there.
Also, if you look in /var/log/procmail.log, you can see where exactly the emails are being delivered.
-Eric
/var/log/procmail.log
Dec 11 21:56:39.237 [21800] warn: config: created user preferences file: /home/halocommunity/home/.spamassassin/user_prefs
From autonamus@gmail.com Tue Dec 11 21:56:32 2012
Subject: Re: jhfjhg
Folder: /var/mail/james.halocommunity 2732
Time:1355281004 From:autonamus@gmail.com To:james@halocommunity.com User:james.halocommunity Size:2732 Dest:/var/mail/james.halocommunity Mode:None
From autonamus@gmail.com Tue Dec 11 22:01:29 2012
Subject: Re:
Folder: /var/mail/james.halocommunity 2679
Time:1355281299 From:autonamus@gmail.com To:james@halocommunity.com User:james.halocommunity Size:2679 Dest:/var/mail/james.halocommunity Mode:None
Dec 11 23:42:48 server1 postfix/smtpd[26866]: connect from mail-ie0-f170.google.com[209.85.223.170]
Dec 11 23:42:49 server1 postfix/smtpd[26866]: 11B6CE9824C9: client=mail-ie0-f170.google.com[209.85.223.170]
Dec 11 23:42:49 server1 postfix/cleanup[26870]: 11B6CE9824C9: message-id=<CANGUv-EzfbRMuvMoJVFauFsCTgT2YtFpDHMZYdiCUgUXbG6uTg@mail.gmail.com>
Dec 11 23:42:49 server1 postfix/qmgr[21702]: 11B6CE9824C9: from=<autonamus@gmail.com>, size=2297, nrcpt=1 (queue active)
Dec 11 23:42:58 server1 postfix/local[26871]: 11B6CE9824C9: to=<james.halocommunity@server1.halocommunity.com>, orig_to=<james@halocommunity.com>, relay=local, delay=9.8, delays=0.1$
Dec 11 23:42:58 server1 postfix/qmgr[21702]: 11B6CE9824C9: removed
Dec 11 23:43:19 server1 postfix/smtpd[26866]: disconnect from mail-ie0-f170.google.com[209.85.223.170]
It looks like the emails are still going into /var/mail/; however, that's something that we attempted to fix by changing the procmailrc.
Can you paste in the contents of your /etc/procmailrc file again? I'd like to double-check that it looks correct.
-Eric
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/
ORGMAIL=$HOME/Maildir/
DROPPRIVS=yes
:0
$DEFAULT
Your procmailrc looks good.
You may want to check in the home directory for the user "james.halocommunity", and make sure there's no .procmailrc file that's specifying a path of /var/mail for the email destination.
Also, just to rule this out, what output does this command produce:
grep var /etc/webmin/virtual-server/procmail/*
didn't output anything. and I'll check for the files now.
No files found. just have the main ones like cur, tmp, new and some dovecot files.
So while just looking around I managed to intercept the email while it was going though my server Main Queue. so it's defiantly making it to my server it's just not being sent to the webmail
See attached image
Yeah... those procmail logs you showed earlier definitely show the emails reaching your server, and even your local accounts... it's just that they're being delivered to the wrong location.
I looked at your /etc/procmailrc text again, I think there may be a copy and paste problem in there :-)
The text that should be in there is as follows:
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
However, what's in your file is this:
ORGMAIL=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
That is, both lines are the same... one of those should be "DEFAULT", rather than "ORGMAIL".
Try tweaking that, and see if that helps.
-Eric
That's got it. Thanks so much!
Super, I'm glad it's working!
Hey,
This has all stopped working again. It's rather frustrating. I have gone through and everything seems to be good. care to help more?
After double checking.
the /etc/procmailrc file seems to keep reverting it's self. does virtualmin keep doing that?
Nevermind this post. I made a typo in the name.
After doing some more tests. Sending of mails works fine. automated mailbox replies and forwarding also works. emails are just not being shown in webmail.
I'm going to go ahead and just reinstall Virtualmin as I wasn't the one to install it. This way I can rule out user error on setup.