Mailproblem

Hi,
i am a little bit confused; while almost any email accounts work; some of them doesn’t.

I have checked various posts here, and yes, the line “myorigin=” has been removed from main.cf The problem, in fact is, that with one specific virtual server, i won’t be able to receive postmaster@ webmaster@ emails.

Standard User Mail is working; but the system’s mail aliases don’t work. I will always get:

Recipient address rejected: User unknown in virtual mailbox table

This is driving me nuts. I have forwarded the emails for postmaster@ to an external email-address, although this is working with other virtual servers, it won’t work with this one specific server.

hostname -f returns a FQDN neither Postfix or Apache claim about missing FQDN. I have set the hosts files like this:

example.com example

I am wondering, what is happening there, because, as said before, it is one specific virtual server, which does not work as intended.

For any insight, i would be very grateful :slight_smile:

Tia
j_m

Howdy,

Hmm, can you clarify what your hostname there is?

A hostname would typically be an FQDN format – host.example.com. It looks like you just mentioned “example.com” though.

If your hostname is just a domain name, and also happens to be a Virtual Server, that can sometimes cause problems.

I’d recommend making sure that your hostname is in the format host.example.com, and that there’s no Virtual Server with the same name as your hostname.

-Eric

with the same name.
I have entered every virtual host like this:
example1.com
example2.com
example3.com
etc.

My hostname is
example.com

Should i have had www.example1.com instead?

I will probably need to have also an virtual host like example.com; so i will have to change hostname in something different.
What would you suggest to use? And how could i achieve this without having to reinstall everything?

But anyway, although normal emailusers under example1.com work, the systemaliases won’t, so any mail to webmaster, postmaster etc. will bounce.

Thanks for help.

Problem is, that i want to issue certificates for example1.com, and i will need to receive an confirmation code on one of the system accounts in order to continue, so i will have to get it working somehow.

Btw, when i wanted to copy newly created certificates over to Webmin Virtualmin died with an errormessage, like could not find PID, and then wasn’t available anymore. I restarted the system but webmin didn’t work. Afterwards i found out, that he said, that he couldn’t open the certificates file, although it had all the rights and user/group settings like one on a another server i compared it to, but it kept nagging. So i commented the line with the named cert file and changed the line of the keyfile back to the standard .pem file and was able to get it up again.
I also encountered missing Mailbox Dirs, also with an missing PID error…

Very strange…

Best and thanks for help.

I poked around a bit and compared the settings for the virtual servers, with which it is working, and i found out, that there doesn’t seem to be a difference. So if anyone could point me in the right direction, i’d appreciate it very much.

Best
j_m

I will probably need to have also an virtual host like example.com; so i will have to change hostname in something different. What would you suggest to use? And how could i achieve this without having to reinstall everything?

Well, if you’d like to use example.com sometime as a Virtual Server, it might make this a good time to change your hostname.

It’s simple to do though, and does not require reinstalling.

You can do that by going into Webmin -> Networking -> Network Config -> Hostname and DNS Client, and change your hostname there.

When you’re done, try restarting Webmin, as that may resolve the PID errors you received. You can do that with this command:

/etc/init.d/webmin restart

When you’ve completed that, see if that resolves your email issue.

If not – one place to start would be to go into System Settings -> Re-Check Config, and make sure it doesn’t notice any problems.

-Eric

I gave it a try and deactivated Bind9 for that specific domain, but that didn’t help either…

Should i create a subdomain like service.example.com for changing the hostname, or what would you suggest?

Tia

j_m

I’m not really sure what the problem is, unfortunately… you’ll probably need to show us the section from your logs where the problem is occurring.

Could you generate an email, and then show us what appears in the logs?

Thanks!

-Eric

Here are some entries from log files:

i found this one repeatedly:

warning: dict_nis_init: NIS domain name not set - NIS lookups disabled

But it looks like there is a server in Taiwan, where someone tried to use the mailserver as relay.

Also freshclam seems to have a problem:
freshclam[19137]: segfault at 13d2000 ip 00007f35348c0e78 sp 00007fff57c65160 error 4 in libclamav.so.6.1.7[7f353468e000+907000]

But it does not show anything about the message, which was bounced. Weird, huh?

The message is bounced with Err 550; but the alias is available, and whether i set it to forward it to an external mail account, the admin user of the virtual domain or the admin user’s email, nothing works at all.

Best

See /usr/share/postfix/main.cf.dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

appending .domain is the MUA’s job.

append_dot_mydomain = no

Uncomment the next line to generate “delayed mail” warnings

#delay_warning_time = 4h

readme_directory = no
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
inet_interfaces = all
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10023
mydestination = $myhostname, localhost.$mydomain, localhost
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_security_level = may
smtpd_tls_mandatory_ciphers = high

and, really unbelievable, it works with the system Email right out of the box, weird, huh?

looks like i will have to delete the virtual server and create it new and set it up again ;-(

Any other idea i will really appreciate, since this takes quite a while

Thanks in advance

j_m