Thanks Gilles,

That's certainly helpful, however I'm now getting this error in maillog:

Jan 20 19:05:55 www smtpd[25849]: smtp-in: Started TLS on session
85fbdf2738fdc04a: version=TLSv1/SSLv3, cipher=ECDHE-RSA-AES256-SHA, bits=256
Jan 20 19:05:55 www smtpd[25849]: smtp-in: Authentication failed for user
danny on session 85fbdf2738fdc04a
Jan 20 19:05:56 www smtpd[25849]: smtp-in: Failed command on session
85fbdf2738fdc04a: "Szl4eWdzbXJ6dDgq" => 535 Authentication failed
Jan 20 19:05:56 www smtpd[25849]: smtp-in: Received disconnect from session
85fbdf2738fdc04a

I've only added the line you advised and I know my password is correct, I
even logged in and used 'passwd' on my account to be sure.


On 20 January 2014 16:01, Gilles Chehade <[email protected]> wrote:

> On Sat, Jan 18, 2014 at 12:12:36PM +0000, Danny Roberts wrote:
> > Minus comments I have the following lines in /etc/opensmtp/smtp.conf:
> >
> > pki mail.thefallenphoenix.net certificate
> > "/etc/pki/tls/certs/mail.thefallenphoenix.net.crt"
> > pki mail.thefallenphoenix.net key
> > "/etc/pki/tls/private/mail.thefallenphoenix.net.key"
> >
> > listen on 95.85.28.67 tls pki mail.thefallenphoenix.net
> >
> > table aliases file:/etc/aliases
> >
> > accept from any for domain "thefallenphoenix.net" alias <aliases>
> deliver
> > to maildir mail
> > accept for local alias <aliases> deliver to maildir mail
> > accept for any relay
> >
> > With this config I can receive emails from remote and local users.
> However
> > I am not sure how to set-up authentication so that I can send email from
> my
> > domain to any other (e.g. gmail).
> >
> > In the past I've used exim and set it up to authenticate against Dovecot.
> > Ideally I'd like to be able to do the same or perhaps use the /etc/passwd
> > file for authentication. Can anyone explain how to force authentication
> > when I'm sending a mail?
> >
> > I am using OpenSMTPD 5.4.1p1 on CentOS 6.4 x64.
> >
>
> Hi,
>
> If you just turn:
>
> > listen on 95.85.28.67 tls pki mail.thefallenphoenix.net
>
> into
>
> > listen on 95.85.28.67 tls pki mail.thefallenphoenix.net auth-optional
>
> without touching any other rule, you will require authentication before
> relaying to outside domains.
>
> This works because once you authenticate, you are considered a local user
> and you will match the following rule:
>
> > accept for any relay
>
>
>
> As for the auth database, by default opensmtpd uses the system database
> so if you're authenticating from /etc/passwd, it'll work out of the box
> otherwise you will need to use a table that shares the auth data with
> Dovecot. You can use any backend for that, table_passwd is the simplest
> as you simply create a passwd-style file:
>
>    user:encryptedpasswd:uid:gid:gecos:home:shell
>
> and use:
>
>    table myusers passwd:/path/to/your/file
>
> and setup dovecot to use the same file
>
>
> --
> Gilles Chehade
>
> https://www.poolp.org                                          @poolpOrg
>



-- 
Kind Regards
Danny R

Website: http://danny-roberts.info/

Reply via email to