|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
[OpenSMTPd] Issue with local mails
Hello,
I have a system running OpenBSD 6.4 as a gateway with only two local users : "root" and "foo". I use the Gmail email service and I do not know how to configure OpenSMTPd as I want :-( 1) I want to be able to send emails to Gmail addresses from local gateway users. 2) I also want emails sent from local gateway users to local gateway users to be delivered not to local mailboxes but to be sent to a Gmail address. N°1 is OK : it does work from the users "root" and "foo". Code:
echo "Message" | mail -s "Test" foo.bar@gmail.com But I don't know how to make it for n°2. Below are my config files... Code:
root@145 [17:54:29]:/etc/mail$ cat aliases root: foo foo: foo.bar@gmail.com # The two above lines are the only lines I changed/added. # (I reloaded the file with newaliases) Code:
root@145 [17:56:15]:/etc/mail$ cat secrets aspmx.l.google.com foo.bar@gmail.com:gmail_account_password #aspmx.l.google.com is the SMTP server Code:
root@145 [17:56:18]:/etc/mail$ cat smtpd.conf ######################## # Macros ######################## LOOPBACK="lo0" LAN_IP="192.168.0.1" ######################## # Listening interfaces ######################## listen on $LOOPBACK listen on $LAN_IP ######################## # Tables ######################## table aliases file:/etc/mail/aliases table secrets file:/etc/mail/secrets ######################## # Actions ######################## action "relay" relay host smtp://aspmx.l.google.com auth <secrets> action "local" mbox alias <aliases> ######################## # Matches ######################## match for any action "relay" match for local action "local" ######################## # EOF ######################## Thanks a lot for you assistance. |
Tags |
open smtp |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenSMTPD | gpatrick | OpenBSD General | 1 | 23rd February 2011 01:01 AM |
send mails with postfix | wesley | OpenBSD Packages and Ports | 1 | 18th August 2010 07:34 PM |
log from rc.conf.local and rc.local | sdesilet | OpenBSD General | 1 | 21st January 2010 02:37 AM |
backup mails on NAS directory | milo974 | OpenBSD General | 3 | 8th August 2008 07:39 AM |
Proper display of accents in mails sent by PERL | stukov | Programming | 5 | 15th May 2008 04:03 AM |