Email with Postfix, Dovecot, and MySQL problems
I set up a new mail server using the guide:
I'm getting a number of errors and would appreciate any help.
In testing from various email clients I can't seem to authenticate the email account.
Here is the error from the mail log:
dovecot: imap-login: Aborted login (auth failed, 1 attempts in 6 secs): user=<
doveconf: Warning: Configuration file /etc/dovecot/conf.d/10-master.conf line 1: Ambiguous '#' character in line, treating it as comment. Add a space before it to remove this warning.
doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-master.conf line 1: Expecting '='
which is odd because the first two lines never changed in the file:
defaultprocesslimit = 100
defaultclientlimit = 1000
maybe related to authentication error is the sql statement in the guide for creating a new email in the virtual_users table doesn't seem to work:
INSERT INTO mailserver
.virtual_users
(domain_id
, password
, email
)
VALUES
('5', ENCRYPT('newpassword', CONCAT('$6/gd1nnpeekaaxxidx>, SUBSTRING(SHA(RAND()), -16))) , '
I was able to tweak it to get it to work:
INSERT INTO mailserver
.virtual_users
(id
, domain_id
, password
, email
) VALUES ('1', '1', ENCRYPT('password
, CONCAT(`$6<gd1nnpeekaaxxidx, SUBSTRING(SHA(RAND()), -16))'), '
Any help would be appreciated.
4 Replies
@denpub:
doveconf: Warning: Configuration file /etc/dovecot/conf.d/10-master.conf line 1: Ambiguous '#' character in line, treating it as comment. Add a space before it to remove this warning.
doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-master.conf line 1: Expecting '='
This can happen if the password has a # character in it.
See
ENCRYPT(password
, CONCAT(`$6
I was able to resolve the authentication errors. There seemed to be some malformed code in the sql statement to add addresses in the tutorial.
I was able to find the same statement somewhere else that worked without giving SQL errors:
INSERT INTO mailserver
.virtual_users
(id
, domain_id
, password
, email
)
VALUES
(1
, 1
, ENCRYPT(‘password1, CONCAT($6<r, SUBSTRING(SHA(RAND()), -16))),
(2
, 1
, ENCRYPT(‘password2’, CONCAT($6<r, SUBSTRING(SHA(RAND()), -16))), ‘<email email="email2@domain.com">email2@domain.com</email>
);
I am now able to connect to the server with a mail client but emails to the address get bounced back with the following error:
–------------------------------------
Mail Delivery System <
7:10 PM (8 minutes ago)
to me
This is the mail system at host mail.domain.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<
for mail.domain.com loops back to myself
Final-Recipient: rfc822;
Original-Recipient: rfc822;
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for mail.beneteauguitars.com loops back to
myself
---------- Forwarded message ----------
From: Dennis <
To:
Cc:
Date: Mon, 31 Aug 2015 19:10:13 -0400
Subject: test
Can anyone help, please?
so I resolved the loopback issue by changing in the postfix/main.cf:
mydestination = localhost
to
mydestination = localhost.$mydomain, localhost, mail.domain.com
Now I'm getting the following bounce back error:
–-------------------------------------------------------------------
<
unknown user: "1"
Reporting-MTA: dns; mail.domain.com
X-Postfix-Queue-ID: D7B102007D
X-Postfix-Sender: rfc822;
Arrival-Date: Mon, 31 Aug 2015 22:41:39 -0400 (EDT)
Final-Recipient: rfc822;
Original-Recipient: rfc822;
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "1"
where is the user "1" coming from? Is it because
Does it have something to do with the dns settings:
MX Records
Mail Server Preference Subdomain TTL Options
mail.domain.com 10 Default Edit | Remove
A/AAAA Records
Hostname IP Address TTL Options
my.linode.ip Default Edit | Remove
mail my.linode.ip Default Edit | Remove
www my.linode.ip Default Edit | Remove
my:IPv6 Default Edit | Remove
mail my:IPv6 Default Edit | Remove
www my:IPv6 Default Edit | Remove
Do I need to start a new thread?