Creation of Virtual Server fails to enable mail

When I create a virtual server the mail system fails to be enabled. The server will create but mail is unavailable. If I try to edit the VS and enable mail the same problem occurs.

Adding to email domains list …
… Mail for domain failed! :

There is nothing in the syslog or any other log I can find that give more detail on what is causing the issue.

Any thoughts on what else to do?

Howdy,

Well, I had added a response to your original post over here:

http://www.virtualmin.com/forums/help-home-for-newbies/mail-for-domain-failed.html#23719

Did you get a chance to work through the LDAP tutorial link there?

LDAP increases the opportunity for things to go awry in this realm :slight_smile:

But, let us know when you get a chance to read over that tutorial and verify your email settings, and we can work from there!
-Eric

Yes, I did use the LDAP setup guide to get going. The LDAP seems to work correctly. I can add users etc.

Mmm, ok, so if you log into your server over SSH, and type this command:

postconf -n

What output do you get?

Thanks!
-Eric

I went ahead and cleaned up the host and destination lines in webmin. I will try again and post if this makes a difference or not.

No difference still get the failure to create the alias.

Adding to email domains list …
… Mail for domain failed! :

I figured it out. Problem solved. I missed a couple of things in going through the postfix LDAP setup. Rather than reading it online, I printed just that section and walked through it slowly.

I found that a better way to debug is to try to create the aliases in Webmin. That gave a much more detailed error message that allowed me to zero in on the parts of the set up that were causing the issue.

Thanks for the help.

That’s wonderful, I’m glad you got it, because I was really running low on ideas :slight_smile:

Mind if I ask two questions for future reference?

  1. What was the specific issue in this case?

  2. What was the error you received when creating an alias? (then anyone searching would hopefully find this thread!)

Thanks a bunch for posting about your success!
-Eric

The error message in virtualmin was as I noted before:

"Adding to email domains list …

… Mail for domain failed!"

When I tried to create an email alias in Webmin I got two different errors as I worked with it first I did not have an entry in the Result Attribute field. So the error was "no maildrop defined."

Second I had a typo in that field so it gave me an illegal character in the field message.

The key of course was being extremely careful going through the setup instructions. I found that printing and marking them off was much better than scrolling through on the screen.

Neal

Here is the output from the command. The thing that looks weird to me is the host name. It has my domain twice.

Neal

alias_maps = hash:/etc/aliases,ldap:/etc/postfix/alias_maps.1.ldap.conf
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = atlas-virtualmin.atlaspcsltd.net.atlaspcsltd.net, localhost.atlaspcsltd.net.atlaspcsltd.net, , localhost
myhostname = atlas-virtualmin.atlaspcsltd.net.atlaspcsltd.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
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_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual,ldap:/etc/postfix/virtual_alias_maps.1.ldap.conf

Here is the output from the command. The thing that looks weird to me is the host name. It has my domain twice.

Neal

alias_maps = hash:/etc/aliases,ldap:/etc/postfix/alias_maps.1.ldap.conf
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = atlas-virtualmin.atlaspcsltd.net.atlaspcsltd.net, localhost.atlaspcsltd.net.atlaspcsltd.net, , localhost
myhostname = atlas-virtualmin.atlaspcsltd.net.atlaspcsltd.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
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_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual,ldap:/etc/postfix/virtual_alias_maps.1.ldap.conf