These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Problems with postfix on the new forum.
I just installed Virtualmin on a fresh Centos 5 and then customized it according to this guide: http://www.howtoforge.com/virtual-hosting-with-virtualmin-on-centos5.1-p2
I migrated a user over from a cPanel server and it is not getting any e-mail sent to it. Checking my /var/log/maillog file, I can see some entries like this:
Feb 15 19:25:07 duck postfix/smtpd[30203]: connect from unknown[112.155.24.20] Feb 15 19:25:08 duck postfix/smtpd[30203]: NOQUEUE: reject: RCPT from unknown[112.155.24.20]: 550 5.1.1 <myuse@mydomain.com.com>: Recipient address rejected: undeliverable address: User unknown in virtual alias table; from=<myuse@mydomain.com.com> to=<aplus_net@mydomain.com> proto=ESMTP helo=<[112.155.24.20]> Feb 15 19:25:08 duck postfix/cleanup[30555]: DC970F0074: message-id=<20100216002508.DC970F0074@myhostname.com> Feb 15 19:25:08 duck postfix/smtpd[30203]: disconnect from unknown[112.155.24.20] Feb 15 19:25:08 duck postfix/qmgr[16479]: DC970F0074: from=<double-bounce@myhostname.com>, size=1128, nrcpt=1 (queue active) Feb 15 19:25:08 duck postfix/error[30762]: DC970F0074: to=<default-mydomain.com@mydomain.com>, orig_to=<postmaster>, relay=none, delay=0, delays=0/0/0/0, dsn=5.0.0, status=bounced (User unknown in virtual alias table) Feb 15 19:25:08 duck postfix/bounce[30891]: warning: DC970F0074: undeliverable postmaster notification discarded Feb 15 19:25:08 duck postfix/qmgr[16479]: DC970F0074: removed Feb 15 19:26:02 duck postfix/pickup[24410]: E8DC4F0074: uid=0 from=<root>
What could be happening here? I'm assuming a problem with postfix, but I don't know how to debug it. Here is my postfix configuration:
# postconf -n address_verify_map = btree:/var/spool/postfix/verify 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 disable_vrfy_command = yes home_mailbox = Maildir/ html_directory = no inet_interfaces = all mail_owner = postfix mail_spool_directory = /var/spool/mail mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, myhostname.com mynetworks = 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix non_smtpd_milters = unix:/var/clamav/clmilter.socket unix:/var/run/spamass.sock queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES recipient_canonical_maps = hash:/etc/postfix/canonical sample_directory = /usr/share/doc/postfix-2.3.3/samples sender_bcc_maps = hash:/etc/postfix/bcc sender_canonical_maps = hash:/etc/postfix/canonical sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_tls_CAfile = /etc/pki/postfix/root.crt smtp_tls_cert_file = /etc/pki/postfix/server.pem smtp_tls_key_file = /etc/pki/postfix/key.pem smtp_tls_note_starttls_offer = yes smtp_tls_session_cache_database = btree:/var/spool/postfix/smtp_tls_cache smtp_use_tls = yes smtpd_data_restrictions = reject_unauth_pipelining smtpd_error_sleep_time = 5s smtpd_hard_error_limit = 20 smtpd_helo_required = yes smtpd_milters = unix:/var/clamav/clmilter.socket unix:/var/run/spamass.sock smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_recipient_access hash:/etc/postfix/access reject_unknown_recipient_domain reject_unknown_sender_domain reject_unverified_recipient reject_non_fqdn_recipient reject_non_fqdn_sender reject_invalid_hostname reject_rbl_client list.dsbl.org reject_rbl_client zen.spamhaus.org reject_rbl_client l1.spews.dnsbl.sorbs.net reject_rbl_client combined.njabl.org reject_rbl_client bl.spamcop.net reject_rhsbl_sender dsn.rfc-ignorant.org reject_rhsbl_sender bogusmx.rfc-ignorant.org reject_rhsbl_sender rhsbl.sorbs.net reject_rhsbl_client dsn.rfc-ignorant.org reject_rhsbl_client bogusmx.rfc-ignorant.org reject_rhsbl_client rhsbl.sorbs.net check_policy_service unix:private/spfpolicy smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sender_restrictions = hash:/etc/postfix/sender_access smtpd_soft_error_limit = 10 smtpd_tls_CAfile = /etc/pki/postfix/root.crt smtpd_tls_cert_file = /etc/pki/postfix/server.pem smtpd_tls_key_file = /etc/pki/postfix/key.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550 unverified_recipient_reject_code = 550 unverified_sender_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
Howdy,
Well, I dunno if this is just a goof in masking the address, or the actual problem, but one thing I notice is that it's trying to deliver to this address:
myuse@mydomain.com.com
However, the other thing you'd want to look into is to make sure that whatever your hostname is, that there's a corresponding line in /etc/hosts, and on the mydestination line of the /etc/postfix/main.cf.
Typically, you'd want an FQDN as your hostname (ie, host.domain.com). And then, have an entry for that in your hosts and main.cf file.
Without that, Postfix could get confused and not realize what server it's running on.
-Eric
Thanks for your reply. The address there was a goof trying to mask it. Sorry for the confusion.
My /etc/hosts file does contain my hostname with the correct (main) IP address for the server. Also, my mydestination variable in /etc/postfix/main.cf is
mydestination = $myhostname, localhost.$mydomain, localhost, duck.mydomain.com, $mydomain
Also, I just noticed some other messages appearing in my /var/log/maillog:
I know this may seem a little silly, but is your FQDN first in the /etc/hosts file?
That is, you'd want:
1.2.3.4 hostname.domain.com hostname
and not:
1.2.3.4 hostname hostname.domain.com
And when you type "hostname', you are seeing the FQDN?
However, according to the HowtoForge article you have there, they're using the "spamass-milter" package. And I have no idea how that works or what exactly it's doing :-) It appears to be what's rejecting the message you pasted in above though.
I'll offer that, out of the box, Virtualmin does email, spam, and virus processing using Postfix, SpamAssassin, and ClamAV without requiring the use of additional packages or a third party repo... and I'm not sure how spamass-milter fits into the puzzle... but it's possible that it's causing some confusion :-)
-Eric
Yes, that was definitely preventing it completely. I stopped /etc/init.d/*milter and commented out a couple lines from my postfix conf file and now I got a few e-mails in my inbox, but they are all server messages. I tried sending an e-mail to myself, but it comes back with the message "User unknown in virtual alias table" even though I have a catch-all address enabled through virtualmin.
Edit :: Actually it seems to happen even if I send it to username@mydomain.com as well. It seems that only the mails originating from the server itself are making it through
Okay, well, that's a step in the right direction.
However, in order to help, I think you're going to end up needing to post your hostname :-) You can always edit the post and mask it out after we figure all this out.
What I'd need to see is the following:
The output of the "hostname" command
The contents of your /etc/hosts file
The full contents of your /etc/postfix/main.cf file
With that, I think we can get a better idea of what's going on.
Thanks,
-Eric
That sounds fine. Fortunately there isn't much on the server yet in case anyone does happen to get in somehow.
hostname: duck.multiwebinc.com
/etc/hosts:
/etc/postfix/main.cf:
Weird, my message appears blank for some reason. There must be some sort of error with this thing. I can edit my post, but when I click save, it is still blank.
Ok, posting it again then...
my hostname: duck.censored-hostname.com
my /etc/hosts:
[code]# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
1.2.3.4 duck.censored-hostname.com duck[/code]
my /etc/postfix/main.cf:
ok it's not liking my /etc/postfix/main.cf file for some reason
It's okay, I'm able to see it if I hit 'Edit'.
And that much looks good, I believe.
I'm kind of struggling with this one... I've seen that error before, but it's always been a hostname related issue.
What if you go into System Settings -> Recheck Config, does that pass without any errors?
-Eric
The AWstats command /usr/share/awstats/wwwroot/cgi-bin/awstats.pl was not found on your system
But that has nothing to do with mail... I'll have to see what's going on with awstats and maybe it will be able to continue with more checks
well for the whole thing:
OK, no errors in re-check config:
I think I might have it. I changed the line:
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
to
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated
and I just received a test e-mail...
I think I spoke too soon. I just sent another one and it came back with the same error "User unknown in virtual alias table". At least I'm getting closer.
Hmm I let it run all night and I got about 550 spam messages and not a single one had this message in it. Most of them were blocked by Spamhaus or being a non-existent domain and about 10 got through. I also sent myself an e-mail that went through fine, so it does seem to be working. Thanks for all your help with this. I really appreciate it.