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.
hostname
server1.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.
Eric
December 10, 2012, 3:34am
2
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
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
Auto-generated hostname. Please do not remove this comment.
173.245.7.238 server1.halocommunity.com server1
Thanks,
James
Eric
December 10, 2012, 5:01am
4
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?
Eric
December 10, 2012, 2:24pm
6
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
Eric
December 10, 2012, 9:59pm
8
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
Eric
December 11, 2012, 3:56am
10
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
Eric
December 11, 2012, 3:09pm
12
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
Eric
December 12, 2012, 2:51am
14
I’m noticing two things there –
It looks like the “myorigin” line is uncommented. Did you by chance uncomment that after changing that didn’t make a difference previously? Or is it possible that uncommenting that didn’t work properly?
That option can cause some problems, so I’d actually suggest leaving it commented out for the time being.
I didn’t notice that previously, but it looks like there’s a spelling error on the last line, the “virtual_alias_maps” line.
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
Eric
December 12, 2012, 4:13am
17
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]
Eric
December 12, 2012, 5:05am
19
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