Issue sending mails from myuser@mydomain.localdomain

7 posts / 0 new
Last post
#1 Tue, 11/10/2015 - 16:56
eXcalibre

Issue sending mails from myuser@mydomain.localdomain

I'm hoping someone can help me with this.

I have a problem with my Virtualmin email system that seems to want to use the format of

myname@mydomin.localdomain not myname@mydomain.co.uk

I'm pretty sure its an issue with the main.cf but am reluctant to start messing with it myself without a little help from this forum.

Appreciate any comments.

This is the extract of the section (I think) from the main.cf

INTERNET HOST AND DOMAIN NAMES

#

The myhostname parameter specifies the internet hostname of this mail system. The default is to use the fully-qualified domain name from gethostname(). $myhostname is used as a default value for many other configuration parameters.

#

myhostname = host.domain.tld myhostname = virtual.domain.tld The mydomain parameter specifies the local internet domain name. The default is to use $myhostname minus the first component. $mydomain is used as a default value for many other configuration parameters.

#

mydomain = domain.tld

bearing in mind i host a few different domains, i wasn't happy just changing anything.

:)

Tue, 11/10/2015 - 17:42
andreychek

Howdy,

Hmm, just to clarify -- when are you seeing that issue?

Anytime something is sending an email from your server, it should set a "From" address. So the first thing you may want to do is verify that anything sending an email sets a "From" address when doing so.

However, as to why you see that behavior when a client isn't setting a From address -- you may want to double-check your server's hostname, which you can do by running the "hostname" command.

-Eric

Wed, 11/11/2015 - 01:32 (Reply to #2)
eXcalibre

Thanks Eric, this is the reply i got from attempting to send an email to someone.

host mx3.onetel.net.uk[62.24.202.3] said: 553 #5.1.8 Domain of sender address steve@MyDonainName.localdomain does not exist (in reply to MAIL FROM command)

MyDomainName was the original domain name and was just changed for privacy. Its only seems to send from the localdomain when sending a mail from the system. If i send one from my mail client it sends just fine with the correct address.

My hostname is a mirror of the domain.

i.e

mydomainname.co.uk

thanks for your time on this, really appreciated.

Wed, 11/11/2015 - 10:36
andreychek

Just to be super-clear, you're saying that if you run the command "hostname", you're seeing "mydomainname.co.uk"?

-Eric

Wed, 11/11/2015 - 11:47
eXcalibre

Thats Correct, do you think this is the issue? should i change the local machine to server.mydomain.co.uk? is it adding the localdomain due to it being the same as the local tld?

Wed, 11/11/2015 - 12:15
andreychek

Howdy,

There's likely a reference to the incorrect name somewhere on your system.

What is the output of "postconf -n"?

Also, is the contents of your /etc/hosts file?

-Eric

Wed, 11/11/2015 - 15:26
eXcalibre

Thanks again for your time on this.

Hosts file (IP_removed with MYPUBLICIP)

127.0.0.1 localhost.localdomain localhost localhost4.localdomain4 localhost4

Auto-generated hostname. Please do not remove this comment.

MYPUBLICIP st3v3.co.uk st3v3 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

postconf

alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = 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 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix 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 message_size_limit = 14800000 mydestination = $myhostname, localhost.$mydomain, localhost, server.st3v3.co.uk newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/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_security_options = noanonymous unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual

Topic locked