Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 30, 2015 10:32 pm 
Offline
Senior Newbie

Joined: Sun Aug 30, 2015 9:44 pm
Posts: 6
Hi

I set up a new mail server using the guide:

https://www.linode.com/docs/email/postf ... -and-mysql

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=<info@domain.com>, method=LOGIN, rip=(my IP), lip=(Linode IP), TLS: Disconnected, session=<GD1nNpEekAAXXIDX>

and from the dovecot.log:

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:

#default_process_limit = 100
#default_client_limit = 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$', SUBSTRING(SHA(RAND()), -16))) , 'email3@newdomain.com');

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$`, SUBSTRING(SHA(RAND()), -16))'), 'email@domain.com');

Any help would be appreciated.


Top
   
PostPosted: Mon Aug 31, 2015 11:29 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
denpub wrote:

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 http://unix.stackexchange.com/questions ... -in-config

_________________
sleddog


Top
   
PostPosted: Mon Aug 31, 2015 12:23 pm 
Offline
Senior Newbie

Joined: Sun Aug 30, 2015 9:44 pm
Posts: 6
Thanks for the info, but it wasn't the problem. I did have an @ symbol in the password but changed to a simpler password and it still didn't work. My gut feeling is it has something to do with the ENCRYPT function of the SQL statement used to add new emails:

ENCRYPT(`password`, CONCAT(`$6$`, SUBSTRING(SHA(RAND())


Top
   
PostPosted: Mon Aug 31, 2015 7:22 pm 
Offline
Senior Newbie

Joined: Sun Aug 30, 2015 9:44 pm
Posts: 6
Update:

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$`, SUBSTRING(SHA(RAND()), -16))), `email1@domain.com`),
(`2`, `1`, ENCRYPT(‘password2’, CONCAT(`$6$`, SUBSTRING(SHA(RAND()), -16))), ‘email2@domain.com`);

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 <MAILER-DAEMON@mail.domain.com>
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

<1@mail.domain.com> (expanded from <info@domain.com>): mail
for mail.domain.com loops back to myself

Final-Recipient: rfc822; 1@mail.domain.com
Original-Recipient: rfc822;info@domain.com
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for mail.beneteauguitars.com loops back to
myself


---------- Forwarded message ----------
From: Dennis <me@gmail.com>
To: info@domain.com
Cc:
Date: Mon, 31 Aug 2015 19:10:13 -0400
Subject: test
--------------------------------------------------------------

Can anyone help, please?


Top
   
PostPosted: Tue Sep 01, 2015 11:48 pm 
Offline
Senior Newbie

Joined: Sun Aug 30, 2015 9:44 pm
Posts: 6
Update again:

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:

---------------------------------------------------------------------
<1@mail.domain.com> (expanded from <info@domain.com>):
unknown user: "1"
Reporting-MTA: dns; mail.domain.com
X-Postfix-Queue-ID: D7B102007D
X-Postfix-Sender: rfc822; me@gmail.com
Arrival-Date: Mon, 31 Aug 2015 22:41:39 -0400 (EDT)

Final-Recipient: rfc822; 1@mail.domain.com
Original-Recipient: rfc822;info@domain.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "1"
-----------------------------------------------------------------

where is the user "1" coming from? Is it because info@domain.com is domian_id 1 in the db?

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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group