I use this in my smtpd.conf: and I have a user defined on the mail server that matches.
table secrets file:/etc/mail/secrets action "outbound" relay host smtp+tls://usern...@mail.relayserver.net:587 auth <secrets> helo myhostname.com match from local for any action "outbound" secrets file: username usern...@mailaddress.net:password Hope that helps or points you in the right direction. Nick On Thu, 16 Jun 2022 at 18:54, Simon Harrison <i...@simonh.uk> wrote: > On Thu, 16 Jun 2022 17:18:56 +0100 > Simon Harrison <i...@simonh.uk> wrote: > > > Embarrassingly, I'm struggling to set up a relay from my home pc, > > laptops etc via my servers. > > > > In the snippet below from the smtpd.conf, the match from src works > > great. I can't work out the correct syntax for the match mail-from > > line: > > > > table secrets file:/etc/mail/secrets > > > > action "relay" relay > > > > match from src xxx.xxx.xxx.xxx for any action "relay" > > > > match mail-from "h...@mydomain.com" auth <secrets> for any action > > "relay" > > > > In /etc/mail/secrets I have > > > > h...@mydomain.com <output of smtpctl encrypt mypassword> > > > > Any help appreciated. > > > > Simon > > > > OK, I've been doing some more research and realised the auth keyword > should be in the listen section on server: > > server smtpd.conf: > > listen on eth0 port 25 tls pki mydomain.com \ > filter { "rdns", "fcrdns", "check_dyndns" } \ > auth <secrets> > > and on home computer smtpd.conf: > > action "relay2" relay host smtp://myserver.com auth <secrets> \ > mail-from "h...@myserver.com" > > But, when checking the log, I keep getting: > > result="PermFail" stat="530 5.5.1 Invalid command: Must issue an AUTH > command first" > > > > >