Postfix configuration - how to change user.user@hostname.fqdn.com to user@domain.com

61 posts / 0 new
Last post
#1 Sun, 10/13/2019 - 23:50
adamjedgar

Postfix configuration - how to change user.user@hostname.fqdn.com to user@domain.com

I note that in my default configuration, I have a number of Virtual Servers that all host different domains. in one virtual server, i have 2 users (aaasq) which is the ftp user created when i setup the virtual server?

Now i need to create another email account...this example uses a president, so i have created an email address president@domain.com. However, Virtualmin appears to do the following:

president.aasq@hostname.fqdn.com

Now I wish to utilize this new email account to link with Domain registry contact, so the email address must be:

president@domain.com

How do i fix my above problem?

Mon, 10/14/2019 - 03:16
Dibs

Have you looked in Webmin - Servers - Postfix Mail Server - Address Rewriting & Masquerading ?

Mon, 10/14/2019 - 15:24
adamjedgar

Will that work for both inbound and outbound email for president@domain.com?

For example the registry is going to send emails to president@domain.com (not president.aaasq@hostname.fqdn.com)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 10/14/2019 - 16:51 (Reply to #3)
Dibs

It's both inbound & outbound - mine are set up as

Rewrite "user%domain" to "user@domain" = Yes
Rewrite "user" to "user@domain" = Yes
Rewrite "user@host" to "user@host.$mydomain" = No
Rewrite "user!site" to "user@domain" = Yes

Then the 3 boxes below to
- MAILER-DAEMON
None
None

My users are set up as user. My outbound go as user@mydomain.com and inbound emails coming to user@mydomain,com turn up in the users mailboxes.

HIH

Dibs

Mon, 10/14/2019 - 17:07 (Reply to #4)
adamjedgar

Yes my Webmin>Servers>Address Rewriting and Masquerading settings the same as yours above.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 10/14/2019 - 17:15 (Reply to #5)
Dibs

And emails still go out as user.user@hostname.fqdn.com ?

Have you tried in Webmin - Servers - Postfix: Reload Configuration, then Stop PostFix & Start Postfix? Issue still persists?

And you've sent an email to say a gmail or hotmail account and examined the headers?

Mon, 10/14/2019 - 17:23
Dibs

On the domain in question - create a new user. Virtualmin (making sure the domain is correct in the dropdown) - Edit Users - Add a User to this server.

Then set president1 as the email address - your domain name should already show on the screen. In Other User permission - just verify it says Email Only.

Then send an email to that user from Hotmail/Gmail - does it arrive? Send Hotmail/Gmail an email from that account & check the headers to see who the envelope-from states. If you haven't got as far as setting SPF records for the domain - there is a chance that the email to Hotmail\Gmail might end up in Spam\Junk or be rejected. But Hotmail\Gmail should still be able to send an email and you can check correct receipt of that.

I personally don't have an email or anything else associated with a Virtual Server's primary account. That isn't what you are try to do is it?

Mon, 10/14/2019 - 17:32
adamjedgar

I am sure that the problem is FTP login when new user is created. Now that I have followed the following forum thread...https://www.virtualmin.com/node/20128

I note that Erik says, when configuration is changed so that its user@domain.com, you have to start over (ie delete user and create a new one). So after making the configuration changes, I created a new user secretary. virtualmin now correctly shows this as secretary@domain.com

Others stated on the thread link I have added above, that they could simply edit the user in webmin>System>Users and Groups. So I will try this for president.aaasq and report back what happens.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 10/14/2019 - 18:44 (Reply to #8)
Dibs

Cool - glad you are making progress. Report back on how you get on.

Thanks

Tue, 10/15/2019 - 00:42
adamjedgar

ok so I can easily send emails from my Virtualmin virtual servers, and they are being received at the other end as (eg) president@domain.com or secretary@domain.com.

having said that, for some reason, I am unable to receive emails unless they are sent too user@hostname.fqdn.com (the webserver itself...not the virtualmin>virtual server/domain).

Your message couldn't be delivered. Despite repeated attempts to deliver your message, querying the Domain Name System (DNS) for the recipient's domain location information failed.

I am not using the Bind to control dns on the hosting server. I simplly point an A record at the server ipaddress...so dns is controlled externally by registrar.

I note that in Virtualmin docs it says...if one wishes to have multiple domains using emails where there is a chance "joe"@domain.com could be used for any number of different domains, any email sent to "joe" would get delivered to any user on the entire webhosting server. That makes one figure, ok, I need to setup Postfix Virtual Hosting...however, then i read the following...

Postfix Virtual Hosting
Note: Webmin can be used for virtual hosting most easily with the Virtualmin hosting control panel. It automates all of the following tasks, as well as many others commonly needed in a virtual hosting environment, such as setting up email, name service, and databases

this is all good and well, however, where in the docs does it provide an example of a stock Virtualmin installation, where Postfix and Dovecot are working, for us to compare with? (this is a huge problem)

what i really need is a detailed working example of exactly how to configure a postfix/dovecot mail server in Webmin/Virtualmin that can provide email for multiple domains+SSL with the format mail@domain.com (not "mail@hostserver.fqdn.com").

Even when we go onto the web looking for other tutorials on setting up postfix, one thing i really struggle with is the inconsistency in naming convention used in Virtualmin...it does not exactly line up with commonly used terms in various tutorials on the internet. So its easy for those on this forum who are way less skilled than me (and whilst i am good with webhosting, email servers certainly aren't my forte)

I have sent an email to president@domain.com, then checked webmin>postfix mail server>Mail queue...its empty.

Does multiple domains work with mail if I am not using Bind in Virtualmin? (ie Virtualmin>Edit Virtual server> dns domain enabled = unchecked

How does president@domain.com resolve in Virtualmin if "dns domain enabled" is not checked? (i ask this because of dns error above)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 09:09
Dibs

Do you have an MX record for the domain?

Tue, 10/15/2019 - 13:56
adamjedgar

Yes i do have mxrecords.

Emails are being sent out from this user in webmin, but not received by this user (no inbound) ..its almost like dovecot isnt working properly because in Usermin the create mail button isnt working and i occasionally get a pop3 authentication error (i am using IMAP)

Where are the docs for "detailed" postfix/dovecot configuration for virtualmin?

Can i just use docs from elsewhere that are more informative? (Such as the ISPConfig ones at howtoforge.com)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 14:09
Dibs

Open up 2 Chrome tabs (or whatever browser you use). In one - go to "Webmin - System - System Logs" and click on View for file /var/log/mail.log. It should be Yes for Active. If not that's another issue - but in a default install, it should be Yes.

In the 2nd browser tab - open your Hotmail\Gmai or external mail -send an email to president\secretary email account an email.

Once sent - go to Tab 1 (the mail log) and hit refresh a few times if need to be to see what happens. PostFix should log the incoming email and what it does with it.

Tue, 10/15/2019 - 14:14
Dibs

I just sent my email address on a domain (virtual server) an email from my Yahoo account and saw the following lines in my log

Oct 15 20:05:06 host1 postfix/smtpd[27776]: connect from sonic303-21.consmr.mail.ir2.yahoo.com[77.238.178.202]
Oct 15 20:05:07 host1 policyd-spf[27779]: None; identity=helo; client-ip=77.238.178.202; helo=sonic303-21.consmr.mail.ir2.yahoo.com; envelope-from=myemail@yahoo.co.uk; receiver=email.address@mydomain.com
Oct 15 20:05:07 host1 policyd-spf[27779]: Pass; identity=mailfrom; client-ip=77.238.178.202; helo=sonic303-21.consmr.mail.ir2.yahoo.com; envelope-from=myemail@yahoo.co.uk; receiver=email.address@mydomain.com
Oct 15 20:05:07 host1 postfix/smtpd[27776]: 7DF9D3CCF9: client=sonic303-21.consmr.mail.ir2.yahoo.com[77.238.178.202]
Oct 15 20:05:07 host1 postfix/cleanup[27780]: 7DF9D3CCF9: message-id=<1466283496.3307480.1571166302794@mail.yahoo.com>
Oct 15 20:05:07 host1 postfix/qmgr[1635]: 7DF9D3CCF9: from=<myemail@yahoo.co.uk>, size=3557, nrcpt=1 (queue active)
Oct 15 20:05:07 host1 postfix/smtpd[27776]: disconnect from sonic303-21.consmr.mail.ir2.yahoo.com[77.238.178.202] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Oct 15 20:05:08 host1 spamd[27920]: spamd: connection from ::1 [::1]:44456 to port 783, fd 5
Oct 15 20:05:08 host1 spamd[27920]: spamd: setuid to email.address@mydomain.com succeeded
Oct 15 20:05:08 host1 spamd[27920]: spamd: processing message <1466283496.3307480.1571166302794@mail.yahoo.com> for email.address@mydomain.com:1012
Oct 15 20:05:08 host1 spamd[27920]: spamd: clean message (1.2/6.0) for email.address@mydomain.com:1012 in 0.3 seconds, 3699 bytes.
Oct 15 20:05:08 host1 spamd[27920]: spamd: result: . 1 - BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,MIME_HTML_MOSTLY,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS scantime=0.3,size=3699,user=email.address@mydomain.com,uid=1012,required_score=6.0,rhost=::1,raddr=::1,rport=44456,mid=<1466283496.3307480.1571166302794@mail.yahoo.com>,bayes=0.463198,autolearn=no autolearn_force=no
Oct 15 20:05:08 host1 postfix/local[27781]: 7DF9D3CCF9: to=<email.address-mydomain.com@host1.mydomain.net>, orig_to=<email.address@mydomain.com>, relay=local, delay=2.1, delays=1.3/0.01/0/0.83, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Oct 15 20:05:08 host1 postfix/qmgr[1635]: 7DF9D3CCF9: removed

and the email is in the inbox when I checked the local account.

Obviously hostname, sender & recipient have been generic'd to host1, myemail@yahoo.co.uk & email.address@mydomain.com.

Tue, 10/15/2019 - 14:17
Dibs

Can you post up your DNS records for the domain in question? There's nothing top secret in them. ;)

Tue, 10/15/2019 - 15:32
adamjedgar

Ok so i have found at least one error in my dns that i should have picked up on before and at least now i am getting somewhere.

At some point in the past (not sure when it was now), I have either inadvertantly deleted (or simply forgot to add in) the following "A record"...

mail.domain.com @ serverip address

So at least now, i immediately get the following postmaster error when i attempt to send email to president@domain.com

server1.host.com.au rejected your message to the following email addresses:
president@domain.com.au (president@domain.com.au)
The address you sent your message to wasn't found at the destination domain. It might be misspelled or it might not exist. Try to fix the problem by doing one or more of the following:
1. Send the message again, but before you do, delete and retype the address. If your email program automatically suggests an address to use, don't select it.
2. Clear the recipient AutoComplete cache in your email program by following the steps in this article: Status code 5.1.1. Then resend the message, but before you do, be sure to delete and retype the address.
3. Contact the recipient by some other means (by phone, for example) to confirm you're using the right address. Ask them if they've set up an email forwarding rule that could be forwarding your message to an incorrect address.

server1.host.com.au gave this error:
<president@domain.com.au>: Recipient address rejected: User unknown in virtual alias table

So, i believe that if i sort out the Virtual Alias table, things should work. My question now is, i thought that Virtualmin was supposed to do this automatically?

P.S. Also getting the same postmaster error for secretary@domain.com

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 15:39
Dibs

Mail doesn't normally have an A record. Usually, in the cases I've seen\experienced, the IP address has an A record with @ and there are CNAME's for the aliases like www, ftp, mail. Then there is an MX record pointing to the mail.domain.com (effectively the CNAME).

Post up what you have for the DNS records please? Generic out the names & set the IP to 1.1.1.1 if you'd prefer?

Tue, 10/15/2019 - 15:43
Dibs

I've got a out of the box install of Virtualmin and adding new VirtualServers (did one in the last 2 weeks) - I've not had issues with anything (bar the recent 6.04 + Apache thing about *:80 vs IP:80 but that's not relevant here).

Nor had issues with the Alias table or anything else of significance. Even "adjusting" Postfix to become more secure can be done from the GUI.

Also DNS changes take time to propogate.

Tue, 10/15/2019 - 15:49
adamjedgar

Actual Registrar DNS are as follows...

domain.com.au. SOA 3600 ns1.partnerconsole.net.
domain.com.au. A 300 1.1.1.1
mail A 3600 1.1.1.1
webmail A 300 1.1.1.1
www CNAME 3600 domain.com.au.
domain.com.au. MX 3600 mail.domain.com.au. 5
domain.com.au. NS 3600 ns1.partnerconsole.net.
domain.com.au. NS 3600 ns2.partnerconsole.net.
domain.com.au. NS 3600 ns3.partnerconsole.net.
domain.com.au. TXT 300 "v=spf1 a mx a:domain.com.au ip4:1.1.1.1 ip4:1.1.1.1 ip6:fe80::5400:1ff:fef1:5674 ?all"



suggested records by virtualmin use an A record for mail.domain.com (see below)

domain.com. IN A 1.1.1.1
www.domain.com. IN A 1.1.1.1
ftp.domain.com. IN A 1.1.1.1
m.domain.com. IN A 1.1.1.1
localhost.domain.com. IN A 127.0.0.1
webmail.domain.com. IN A 1.1.1.1
admin.domain.com. IN A 1.1.1.1
mail.domain.com. IN A 1.1.1.1
domain.com. IN MX 5 mail.domain.com.
domain.com. IN TXT "v=spf1 a mx a:domain.com ip4:1.1.1.1 ip4:1.1.1.1 ip6:fe80::5400:1ff:fef1:5674 ?all"



EDIT.... I am confused that the mail record error popped up, because i have just realised that i had the following mxrecord anyway...

domain.com.au. MX 3600 mail.domain.com.au. 5 should this record have resolved without me having to also add an A record?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 16:07
Dibs

Your DNS records don't look correct.

Create a single A record for the base domain - i.e. domain.com.au Create the subdomains as CNAME's - www & mail.

MX record - the control panels I've used just want a hostname, a value & a TTL. So that would be mail.domain.com.au 10 3600 (or whatevr you want to set).

https://www.copernica.com/en/blog/post/a-record-and-mx-record-how-does-i...

I would suggest you look a little closely at the Control Panel you are using a& see if there is any documentation on formats required. I've been caught out recently where the provider wanted it a totally different way to others I'd used.

Tue, 10/15/2019 - 16:04
adamjedgar

can you also look over my etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
#Define the domain list as hash file or as list in the config file.
#virtual_alias_domains = hash:/etc/postfix/virtual_domains

# 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.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
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/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = dane
mynetworks_style = subnet
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_error_sleep_time = 5s
myhostname = host.domain.com.au
mydestination = $myhostname, $mydomain, localhost.$mydomain, domain.com.au, localhost.domain.com.au, localhost
default_process_limit = 2
mydomain = domain.com.au

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 16:16
Dibs

Your main.cf looks ok. My smtp_recipient_restrictions are a little different but that's to be expected. The only real difference is mine has

myorigin = /etc/mailname

and yours has myorigin = $mydomain but that may well be down to your OS is Debian and mine is Ubuntu. Out of the box (Virtualmin) you shouldn't be having these issues. My money is on your DNS records not being correct\propogated.

EDIT: Also mine is inet_protocols = ipv4 as I'me not using IP6. But that's neither here nor there.

Tue, 10/15/2019 - 16:30
adamjedgar

interestingly enough, when i perform an mxtoolbox test on the mxrecord i get the following results...

Connecting to 1.1.1.1

220 host.domain.com.au ESMTP Postfix (Debian/GNU) [2562 ms]
EHLO keeper-us-east-1b.mxtoolbox.com
250-server1.domain.com.au
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8 [844 ms]
MAIL FROM:<supertool@mxtoolbox.com>
250 2.1.0 Ok [844 ms]
RCPT TO:<test@mxtoolboxsmtpdiag.com>

SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)

LookupServer 5453ms
We were able to connect to your email server on port 25. Your server either disconnected before we sent our final QUIT command or did not respond to one of our other diagnostic commands within 15 seconds.

Additional Information
This may be due to a network problem, or could be an anti-spam feature of your email system. On it's own this warning does not point to any specific problem, but can be helpful in diagnosis when combined with other errors.

Hmmm, i wonder...this wouldnt be fail2ban causing this would it???

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 16:36
Dibs

I prefer to use https://www.wormly.com/test-smtp-server it gives easier to follow results.

Edit: I did try the mxtoolbox one on mine & got a relay denied message. LOL As expected in my case.

Tue, 10/15/2019 - 16:40
adamjedgar

I am still getting that same error

SMTP Error: The following recipients failed: user@domain.com.au: : Recipient address rejected: User unknown in virtual alias table

I am sure that i need to fix the Virtual Alias table issue, however, I am not sure how to do this. When i check the Webmin Docs, its says that Virtualmin is supposed to automatically sort the Virtual Alias functionality. How to fix?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 16:46
Dibs

What's the full text of the response?

Edit - use https://dnschecker.org/mx-record-validation.php and see what the response is?

Tue, 10/15/2019 - 16:50
adamjedgar

This is the one from mxtoolbox

Connecting to 104.156.233.188

220 host.domain.com.au ESMTP Postfix (Debian/GNU) [797 ms]
EHLO keeper-us-east-1c.mxtoolbox.com
250-host.domain.com.au
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 SMTPUTF8 [828 ms]
MAIL FROM:<supertool@mxtoolbox.com>
250 2.1.0 Ok [828 ms]
RCPT TO:<test@mxtoolboxsmtpdiag.com>

SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)

LookupServer 3891ms



and this is the reply from Test Your STMP Mail server website you gave me

Resolving hostname...
Connecting...
Connection: opening to domain.com:25, timeout=300, options=array (
               )
Connection: opened
SERVER -> CLIENT: 220 host.domain.com.com.au ESMTP Postfix (Debian/GNU)
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.domain.com.au
               250-PIPELINING
               250-SIZE 10240000
               250-VRFY
               250-ETRN
               250-STARTTLS
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250-DSN
               250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.domain.com.au
               250-PIPELINING
               250-SIZE 10240000
               250-VRFY
               250-ETRN
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250-DSN
               250 SMTPUTF8
CLIENT -> SERVER: MAIL FROM:
SERVER -> CLIENT: 250 2.1.0 Ok
CLIENT -> SERVER: RCPT TO:
SERVER -> CLIENT: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
SMTP ERROR: RCPT TO command failed: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 421 4.7.0 host.domain.com.au Error: too many errors
SMTP ERROR: QUIT command failed: 421 4.7.0 host.domain.com.au Error: too many errors
Connection: closed
2019-10-15 21:37:40 SMTP Error: The following recipients failed: aaasq@domain.com: : Recipient address rejected: User unknown in virtual alias table
Message sending failed.

EDIT... I also tried with fail2ban and spam assassin shutdown...no difference

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 16:55
Dibs

Do you get the same when you send to president\secretary @ domain.com.au ?

Tue, 10/15/2019 - 16:56
Dibs

Also what does you /var/log/mail.log say when you look at it in "Webmin - System - System Logs" for the time you sent the email?

Tue, 10/15/2019 - 16:59
adamjedgar

yes...User unknown in Virtual Alias Table.

Before yesterday, i wasnt using user@domain.com in Virtualmin. trouble was, for some reason the new email account i created for the virtualserver/domain in question refused to work. It was only accepting emails for the new user on the virtual server in the following format

president.aaasq@host.fqdn.com

Obviously that is useless, i wanted president@domain.com

Ever since i made the change, now the entire server email isnt working...in addition to my original problem of course.

Also i note the following when i check Dovecot status...

dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-10-15 13:55:51 AEDT; 19h ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
  Process: 9251 ExecStop=/usr/bin/doveadm stop (code=exited, status=75)
Main PID: 612 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:17 (Reply to #30)
Dibs

From the Terminal type (might need elevated privileges)

systemctl status systemd-journald

what do you get? The same warning? If so check the contents of /var/crash/ - is there files in there?

Tue, 10/15/2019 - 17:04
adamjedgar

system log (where "server1" is the host)

Oct 16 09:03:01 server1 postfix/smtpd[27468]: connect from unknown[46.38.144.57]
Oct 16 09:03:02 server1 postfix/smtpd[7632]: warning: unknown[46.38.144.202]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:03:02 server1 postfix/smtpd[7632]: too many errors after AUTH from unknown[46.38.144.202]
Oct 16 09:03:02 server1 postfix/smtpd[7632]: disconnect from unknown[46.38.144.202] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'pri.authdns.ripe.net/A/IN': 2001:67c:e0::7#53
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'pri.authdns.ripe.net/AAAA/IN': 2001:67c:e0::7#53
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'ari.alpha.aridns.net.au/AAAA/IN': 2001:dcd:1::2#53
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'ari.alpha.aridns.net.au/AAAA/IN': 2001:dcd:4::2#53
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'udns1.ultradns.net/AAAA/IN': 2610:a1:1016::e8#53
Oct 16 09:03:04 server1 named[546]: network unreachable resolving 'udns1.ultradns.net/AAAA/IN': 2610:a1:1014::e8#53

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:07
Dibs

I've just looked back to your 1st post & perhaps I should read more carefully:

I note that in my default configuration, I have a number of Virtual Servers that all host different domains. in one virtual server, i have 2 users (aaasq) which is the ftp user created when i setup the virtual server? Now i need to create another email account...this example uses a president, so i have created an email address president@domain.com. However, Virtualmin appears to do the following: president.aasq@hostname.fqdn.com Now I wish to utilize this new email account to link with Domain registry contact, so the email address must be: president@domain.com How do i fix my above problem?

You appear to have created an FTP user (I take that to be FTP only) otherwise I would have expected something in your post to say it's an "FTP, Email, etc" type user. Which is why earlier on, I was saying that you should create a totally new user in Virtualmin as in Post #7.

But in your last post - you are trying to send emails to aasq, which according to your 1st email is an FTP (I assume only FTP) user. I was expecting that you had created a new user as in post #7 and were trying to send to\from that.

In which case - you aren't going to receive emails sent to it and the server is responding correcting with a 550 message.

EDIT: Or is my understanding wrong? Which is OK.

Tue, 10/15/2019 - 17:14
adamjedgar

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:21
Dibs

Appreciate the picture - says a million words.

I would say ignore aaasq for the moment & focus on one of the other 2. According to Post #10 - when you send as one of those 2 - they receive correctly. Try the wormly tool again and send a test message to one of those 2. Post up the dialog & the lines from the /var/log/mail.log relevant to the time sent. 2 browser windows might be useful - one for each - when you use the wormly tool.

Tue, 10/15/2019 - 17:31
adamjedgar

also, I missed this...here is the answer to comment #31

systemctl status systemd-journald ● systemd-journald.service - Journal Service Loaded: loaded (/lib/systemd/system/systemd-journald.service; static; vendor preset: enabled) Active: active (running) since Thu 2019-09-26 14:54:05 AEST; 2 weeks 5 days ago Docs: man:systemd-journald.service(8) man:journald.conf(5) Main PID: 186 (systemd-journal) Status: "Processing requests..." Tasks: 1 (limit: 4915) CGroup: /system.slice/systemd-journald.service └─186 /lib/systemd/systemd-journald

I will go and do the email test for comment #35 and report back

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:38
adamjedgar

Wormly smtp test (to server ip address)

Connecting...
Connection: opening to 104.156.233.188:25, timeout=300, options=array (
               )
Connection: opened
SERVER -> CLIENT: 220 host.fqdn.com.au ESMTP Postfix (Debian/GNU)
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.fqdn.com.au
               250-PIPELINING
               250-SIZE 10240000
               250-VRFY
               250-ETRN
               250-STARTTLS
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250-DSN
               250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host.fqdn.com.au
               250-PIPELINING
               250-SIZE 10240000
               250-VRFY
               250-ETRN
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250-DSN
               250 SMTPUTF8
CLIENT -> SERVER: MAIL FROM:
SERVER -> CLIENT: 250 2.1.0 Ok
CLIENT -> SERVER: RCPT TO:
SERVER -> CLIENT: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
SMTP ERROR: RCPT TO command failed: 550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 421 4.7.0 host.fqdn.com.au Error: too many errors
SMTP ERROR: QUIT command failed: 421 4.7.0 host.fqdn.com.au Error: too many errors
Connection: closed
2019-10-15 22:33:43 SMTP Error: The following recipients failed: president@domain.com.au: : Recipient address rejected: User unknown in virtual alias table
Message sending failed.

system log at 9.34am when email was sent via wornly

Oct 16 09:34:05 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.242]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:05 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.242]
Oct 16 09:34:05 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.242] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:10 server1 postfix/smtpd[19110]: warning: unknown[46.38.144.57]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19110]: too many errors after AUTH from unknown[46.38.144.57]
Oct 16 09:34:10 server1 postfix/smtpd[19110]: disconnect from unknown[46.38.144.57] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:10 server1 postfix/smtpd[19623]: warning: unknown[46.38.144.179]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19623]: too many errors after AUTH from unknown[46.38.144.179]
Oct 16 09:34:10 server1 postfix/smtpd[19623]: disconnect from unknown[46.38.144.179] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:15 server1 postfix/smtpd[22594]: connect from unknown[46.38.144.17]
Oct 16 09:34:16 server1 named[546]: network unreachable resolving 's.lz6.zl.sampa.br/A/IN': 2001:12f8:6::10#53
Oct 16 09:34:16 server1 postfix/smtpd[22674]: warning: hostname s.lz6.zl.sampa.br does not resolve to address 185.36.81.245: Name or service not known
Oct 16 09:34:16 server1 postfix/smtpd[22674]: connect from unknown[185.36.81.245]
Oct 16 09:34:19 server1 named[546]: network unreachable resolving '0.pool.ntp.org/A/IN': 2a01:4f8:121:43cd::3:1#53
Oct 16 09:34:19 server1 named[546]: network unreachable resolving '0.pool.ntp.org/A/IN': 2400:6180:0:d1::695:5001#53
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.245]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:20 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.245] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: hostname ip-38-37.ZervDNS does not resolve to address 92.118.38.37: Name or service not known
Oct 16 09:34:20 server1 postfix/smtpd[22674]: connect from unknown[92.118.38.37]



I am sure this is a problem with Virtual Alias Table...I am not sure what to do to fix virtual alias functionality in virtualmin?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:39
Dibs

Last time you posted /var/log/system/syslog or something similar. Post up the relevant entries from /var/log/mail.log ?

EDIT: and when you did the wormly test smtp thing - which email address were you sending to? President or secretary? IGNORE this question - It's on the wormly dialog.

Tue, 10/15/2019 - 17:42
adamjedgar

/var/log/mail.log

Oct 16 09:34:05 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.242]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:05 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.242]
Oct 16 09:34:05 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.242] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:10 server1 postfix/smtpd[19110]: warning: unknown[46.38.144.57]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19110]: too many errors after AUTH from unknown[46.38.144.57]
Oct 16 09:34:10 server1 postfix/smtpd[19110]: disconnect from unknown[46.38.144.57] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:10 server1 postfix/smtpd[19623]: warning: unknown[46.38.144.179]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:10 server1 postfix/smtpd[19623]: too many errors after AUTH from unknown[46.38.144.179]
Oct 16 09:34:10 server1 postfix/smtpd[19623]: disconnect from unknown[46.38.144.179] ehlo=1 auth=0/1 rset=1 commands=2/3
Oct 16 09:34:15 server1 postfix/smtpd[22594]: connect from unknown[46.38.144.17]
Oct 16 09:34:16 server1 postfix/smtpd[22674]: warning: hostname s.lz6.zl.sampa.br does not resolve to address 185.36.81.245: Name or service not known
Oct 16 09:34:16 server1 postfix/smtpd[22674]: connect from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: unknown[185.36.81.245]: SASL LOGIN authentication failed: authentication failure
Oct 16 09:34:20 server1 postfix/smtpd[22674]: too many errors after AUTH from unknown[185.36.81.245]
Oct 16 09:34:20 server1 postfix/smtpd[22674]: disconnect from unknown[185.36.81.245] ehlo=1 auth=0/1 commands=1/2
Oct 16 09:34:20 server1 postfix/smtpd[22674]: warning: hostname ip-38-37.ZervDNS does not resolve to address 92.118.38.37: Name or service not known
Oct 16 09:34:20 server1 postfix/smtpd[22674]: connect from unknown[92.118.38.37]

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:51
adamjedgar

did i post my postfix conf file?

here it is...

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
#Define the domain list as hash file or as list in the config file.
#virtual_alias_domains = hash:/etc/postfix/virtual_domains

# 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.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
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/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = dane
mynetworks_style = subnet
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_error_sleep_time = 5s
myhostname = host.fqdn.com.au
mydestination = $myhostname, $mydomain, localhost.$mydomain, fqdn.com.au, localhost.fqdn.com.au, localhost
default_process_limit = 2
mydomain = fqdn.com.au

oh woops yes i did post this already...what about the commented line

#virtual_alias_domains = hash:/etc/postfix/virtual_domains

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 17:55
Dibs

When I sent my email account an email I got the following in wormly:

Resolving hostname...
Connecting...
Connection: opening to mydomain.com:25, timeout=300, options=array (
               )
Connection: opened
SERVER -> CLIENT: 220 host1.myMasterDomain.net ESMTP Postfix (Ubuntu)
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host1.myMasterDomain.net
               250-PIPELINING
               250-SIZE 10240000
               250-ETRN
               250-STARTTLS
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250 DSN
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: EHLO tools.wormly.com
SERVER -> CLIENT: 250-host1.myMasterDomain.net
               250-PIPELINING
               250-SIZE 10240000
               250-ETRN
               250-AUTH PLAIN LOGIN
               250-AUTH=PLAIN LOGIN
               250-ENHANCEDSTATUSCODES
               250-8BITMIME
               250 DSN
CLIENT -> SERVER: MAIL FROM:
SERVER -> CLIENT: 250 2.1.0 Ok
CLIENT -> SERVER: RCPT TO:
SERVER -> CLIENT: 250 2.1.5 Ok
CLIENT -> SERVER: DATA
SERVER -> CLIENT: 354 End data with .
CLIENT -> SERVER: Date: Tue, 15 Oct 2019 22:46:03 +0000
CLIENT -> SERVER: To: email.address@mydomain.com
CLIENT -> SERVER: From: Wormly SMTP Test
CLIENT -> SERVER: Subject: Wormly SMTP Test Message
CLIENT -> SERVER: Message-ID:
CLIENT -> SERVER: MIME-Version: 1.0
CLIENT -> SERVER: Content-Type: text/plain; charset=iso-8859-1
CLIENT -> SERVER:
CLIENT -> SERVER: This message was sent using the Wormly SMTP testing tool by this user:
CLIENT -> SERVER: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
CLIENT -> SERVER: 77.97.223.249
CLIENT -> SERVER:
CLIENT -> SERVER: .
SERVER -> CLIENT: 250 2.0.0 Ok: queued as B79383CEDD
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 221 2.0.0 Bye
Connection: closed
Message completed successfully.

In the /var/log/mail.log a second or 2 after I got:

Oct 15 23:46:04 host1 postfix/smtpd[5530]: connect from tools.wormly.com[96.126.113.160]
Oct 15 23:46:05 host1 policyd-spf[6022]: None; identity=helo; client-ip=96.126.113.160; helo=tools.wormly.com; envelope-from=test@tools.wormly.com; receiver=email.address@mydomain.com
Oct 15 23:46:05 host1 policyd-spf[6022]: None; identity=mailfrom; client-ip=96.126.113.160; helo=tools.wormly.com; envelope-from=test@tools.wormly.com; receiver=email.address@mydomain.com
Oct 15 23:46:05 host1 postfix/smtpd[5530]: B79383CEDD: client=tools.wormly.com[96.126.113.160]
Oct 15 23:46:05 host1 dovecot: imap-login: Login: user=<info@firstaid.events>, method=PLAIN, rip=52.97.128.109, lip=178.79.170.138, mpid=6028, session=<9Ajov/qUBu80YYBt>
Oct 15 23:46:06 host1 postfix/cleanup[6023]: B79383CEDD: message-id=<ed647d99e647b8d4ac28f10491669549@blog.wormly.com>
Oct 15 23:46:06 host1 postfix/qmgr[1635]: B79383CEDD: from=<test@tools.wormly.com>, size=874, nrcpt=1 (queue active)
Oct 15 23:46:06 host1 postfix/smtpd[5530]: disconnect from tools.wormly.com[96.126.113.160] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Oct 15 23:46:06 host1 spamd[27920]: spamd: connection from ::1 [::1]:44712 to port 783, fd 5
Oct 15 23:46:06 host1 spamd[27920]: spamd: setuid to email.address@mydomain.com succeeded
Oct 15 23:46:06 host1 spamd[27920]: spamd: processing message <ed647d99e647b8d4ac28f10491669549@blog.wormly.com> for email.address@mydomain.com:1012
Oct 15 23:46:06 host1 spamd[27920]: spamd: clean message (-1.9/6.0) for email.address@mydomain.com:1012 in 0.3 seconds, 1051 bytes.
Oct 15 23:46:06 host1 spamd[27920]: spamd: result: . -1 - BAYES_00,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE scantime=0.3,size=1051,user=email.address@mydomain.com,uid=1012,required_score=6.0,rhost=::1,raddr=::1,rport=44712,mid=<ed647d99e647b8d4ac28f10491669549@blog.wormly.com>,bayes=0.000000,autolearn=ham autolearn_force=no
Oct 15 23:46:06 host1 postfix/local[6029]: B79383CEDD: to=<myemail.address-mydomain.com@myhost.myMasterdomain.com>, orig_to=<email.address@mydomain.com>, relay=local, delay=1.5, delays=0.82/0.01/0/0.67, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Oct 15 23:46:06 host1 postfix/qmgr[1635]: B79383CEDD: removed
Oct 15 23:46:06 host1 spamd[27919]: prefork: child states: II

the mail.log shows just the last 20 lines by default. You may need to either increase the nbr to say 200 or search for wormly - and once you've established the time of the "connect from tools.wormly.com" then remove the search term and increase the nbr of lines displayed to isolate the initial wormly connection & associated lines.

Tue, 10/15/2019 - 18:01
adamjedgar

My logs are simply filled with thousands of authentication failures...its too many to find to be honest. i am wondering if I can start from scratch with postfix and dovecot on a server with existing websites?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 18:08 (Reply to #42)
Dibs

If you put

connect from tools.wormly.com

in the search box - it should find you the time of the connection from wormly - i.e. when that site made the initial SMTP connection. The 5 or 6 lines that followed will tell you what postfix/procmail are subsequently doing. Otherwise you may end up trying a ton of things and end up with a non functional server.

p.s. I've increased the nbr of lines displayed to 2000 and had no issues.

Tue, 10/15/2019 - 18:12
Dibs

It's also why I was suggesting having 2 tabs open in a browser & as soon as you hit the "Test this SMTP Server" button, then switch to the other browser tab and hit Refresh on the mail log - 99% sure you'll have the relevant lines on the display.

Tue, 10/15/2019 - 18:13
adamjedgar

are we able to private message each other on this forum?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 18:15 (Reply to #45)
Dibs

LOL - I don't think you can. Do you want me to contact you via the email button on your domain?

Tue, 10/15/2019 - 18:33
adamjedgar

Not that one cause its on the same server which is playing up.

can you provide me a url for me to send you my personal one?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Tue, 10/15/2019 - 18:38
Dibs

message deleted.

Tue, 10/15/2019 - 18:44
adamjedgar

ok delete it now...email sent

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Wed, 10/16/2019 - 06:18
adamjedgar

Righto...so for the sake of helping others who may stumble across this thread, i have found my way back to a 75% working mail server again (after it stopped working completely).

The solution, i went through the webmin postfix basic configuration and setup everything as shown in that tutorial. I have not yet gone to the Postfix Virtual domains section at this point in time.

Next, i noticed in postfix mail queue that the status of messages had a common error...all network protocols are disabled. After a bit of googling and then checking my posfix/main.conf had an error...

inet_protocols = 

This needs to have a network protocol...so i changed it to read

inet_protocols =  ipv4

now i have a working mail server again. It is still not 100%, the only issue with the new user email account i created on one of the virtual servers is that postfix wont deliver emails to this particular new account president@domain.com (although it is now delivering emails to all other accounts on the mail server, which is a huge relief)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Wed, 10/16/2019 - 09:04 (Reply to #50)
Dibs

I think somewhere along the line that got changed from inet_protocols = all which was in your main.cfg you posted in Post #21, that probably killed all mail.

I think the real cause of the error is a mis-config of Postfix (somehow) around "What domain to use in outbound mail" setting to to $myhostname as opposed to "/etc/mailname" may have prevented Virtualmin from adding the user\alias in the /etc/postfix/virtual file - hence the error of unknown virtual user (thereabouts).

Hopefully the OP having corrected these, updated his /etc/postfix/virtual file for this one user and regenerated the hash should resolve his issue. (Could have also deleted the problematic user & re-created it too).

I think the key thing to take away from this is BE VERY CAREFUL CHANGING DEFAULT VALUES (unless they look blindingly simple & a read up on the docs & postfix docs say so). Most of all take a backup of your config files & (obviously) change one thing at a time & test. Don't go for the scattergun approach of making multiple changes and then getting stuck not knowing which one\s are the problematic ones. And worse still - not knowing what they were, as you didn't back them up.[NOTE: I'm not saying the OP made multiple changes - but I've seen folk do it.] ;)

Pages

Topic locked