Hi Reindl

 Thanks for the tips. Lesson learned!

 As to this message from the logs:

 Nov 27 11:54:41 mail postfix/trivial-rewrite[16509]: warning: do not list 
domain crispycode.com in BOTH
mydestination and virtual_mailbox_domains

I've changed mydestination from this:

mydestination = $myhostname, $mydomain, localhost.localdomain, localhost

to this:

mydestination = $myhostname, localhost.localdomain, localhost

And that warning I just showed you has gone away.


I tried another telnet test:

[root@mail postfix]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.crispycode.com ESMTP Postfix
HELO mail
250 mail.crispycode.com
MAIL FROM: <bluethu...@jokefire.com>
250 2.1.0 Ok
RCPT TO: <bluethu...@crispycode.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as D1A5724F9F
quit
221 2.0.0 Bye
Connection closed by foreign host.


Which seems to go ok. I tried grepping the logs for the message ID like you 
suggest and this is what I've found.



[root@mail postfix]# grep D1A5724F9F /var/log/maillog
Nov 27 17:01:33 mail postfix/smtpd[17522]: D1A5724F9F: 
client=localhost[127.0.0.1]
Nov 27 17:01:42 mail postfix/cleanup[17531]: D1A5724F9F: 
message-id=<20111127220133.d1a5724...@mail.crispycode.com>
Nov 27 17:01:42 mail postfix/qmgr[16591]: D1A5724F9F: 
from=<bluethu...@jokefire.com>, size=352, nrcpt=1 (queue active)
Nov 27 17:01:42 mail postfix/smtp[17534]: D1A5724F9F: 
to=<bluethu...@crispycode.com>, relay=none, delay=18, delays=18/0.01/0/0, 
dsn=5.4.6, status=bounced (mail for 127.0.0.1 loops back to myself)
Nov 27 17:01:42 mail postfix/bounce[17536]: D1A5724F9F: sender non-delivery 
notification: 91C6C24FA1
Nov 27 17:01:42 mail postfix/qmgr[16591]: D1A5724F9F: removed

So it looks like the message exists, but it's bouncing when sent to the domain.

Another telnet session sending to the FQDN of the mamil host 
(mail.crispycode.com) looks successful in the logs:

[root@mail postfix]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.crispycode.com ESMTP Postfix
HELO mail
250 mail.crispycode.com
MAIL FROM: <bluethu...@gmail.com>
250 2.1.0 Ok
RCPT TO: <bluethu...@mail.crispycode.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test
.
250 2.0.0 Ok: queued as 740E124F9F
quit
221 2.0.0 Bye
Connection closed by foreign host.




[root@mail postfix]# grep 740E124F9F /var/log/maillog
Nov 27 17:06:50 mail postfix/smtpd[17545]: 740E124F9F: 
client=localhost[127.0.0.1]
Nov 27 17:06:54 mail postfix/cleanup[17554]: 740E124F9F: 
message-id=<20111127220650.740e124...@mail.crispycode.com>
Nov 27 17:06:54 mail postfix/qmgr[16591]: 740E124F9F: 
from=<bluethu...@gmail.com>, size=354, nrcpt=1 (queue active)
Nov 27 17:06:54 mail postfix/local[17557]: 740E124F9F: 
to=<bluethu...@mail.crispycode.com>, relay=local, delay=14, 
delays=14/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Nov 27 17:06:54 mail postfix/qmgr[16591]: 740E124F9F: removed

But the current directory where the mail should show up is empty:

[root@mail postfix]# ls -l /home/vmail/crispycode.com/bluethundr/cur/
total 0



 

 Here's a current output of postconf -n

 [root@mail postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.localdomain, localhost
myhostname = mail.crispycode.com
mynetworks = 127.0.0.0/8 10.123.1.0/24
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
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
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
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_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, 
mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_create_maildirsize = yes
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = 
proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maildir_extended = yes
virtual_maildir_limit_message = "The user you are trying to reach is over 
quota."
virtual_overquota_bounce = yes
virtual_uid_maps = static:5000


Thanks again!
Tim

----- Original Message -----
From: "Reindl Harald" <h.rei...@thelounge.net>
To: postfix-users@postfix.org
Sent: Sunday, November 27, 2011 4:33:17 PM
Subject: Re: mail to domain bounced, to hostname accepted



Am 27.11.2011 22:23, schrieb Tim Dunphy:
> Hello,
> 
> I have setup a new postfix sertver and when I send mail to the domain 
> (crispycode.com) the 
> mail will bounce. If I send to the mail host name (mail.crispycode.com) the 
> mail is shown 
> as delivered in the logs. However if you inspect the cur directory on the 
> command line in 
> the user's virtual home directory it's empty and nothing shows up in the 
> squirrelmail interface 
> INBOX. I have virtual users and domains stored in a mysql database.

first: post not so much unfiltered stuff, "cat /var/log/maillog | grep 
<msg-id>" exists
second: start with "postconf-n"

AND read what you post!

Nov 27 11:54:41 mail postfix/trivial-rewrite[16509]: warning: do not list 
domain crispycode.com in BOTH
mydestination and virtual_mailbox_domains


Reply via email to