DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th December 2018
rdikarlus rdikarlus is offline
Real Name: Carlosn
Fdisk Soldier
 
Join Date: Nov 2018
Location: IBZ ISLAND
Posts: 63
Default OpenSMTPD with gmail

Hi All,

after upgrading from 6.3 to 6.4, my OpenSMTPD server is not working any more - it was working before with my gmail account. I quote below my configuration:

/etc/mail/smtpd.conf:
Code:
table aliases file:/etc/mail/aliases
table secrets file:/etc/mail/secrets

listen on lo0

action "local" mbox alias <aliases>
action "relay" relay host smtp+tls://MY_GMAIL_USER@gmail.com auth <secrets>

match for local action "local"
match for any action "relay"
And this is my /etc/mail/secrets file:
Code:
label xxxxxx@gmail.com:my_gmail_password
gmail xxxxx@gmail.com:my_gmail_password
What am I doing wrong? any idea?

Thanks

Last edited by rdikarlus; 24th December 2018 at 07:51 AM. Reason: Please use [code] & [/code] tags when posting file contents.
Reply With Quote
  #2   (View Single Post)  
Old 24th December 2018
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I don't use Gmail as my forwarder, so these are only guesses:

The host should probably be smtp.gmail.com, per https://support.google.com/a/answer/176600?hl=en''

It is unclear to me why you have a "label" record in your <secrets> table, and why you have "gmail" as your userid in the second record.. See the table(5) man page for the proper format of a credentials table, which has two entries per record: userid, then password.
Reply With Quote
  #3   (View Single Post)  
Old 25th December 2018
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

Having a label is correct syntax, according to table(5), for credentials "In a relay context".

Using the correct hostname and port and "smarthost" are all required.

For STARTTLS
smtp+tls://LABEL@smtp.gmail.com:587

should work, but I use SSL
smtps://LABEL@smtp.gmail.com:465
Reply With Quote
  #4   (View Single Post)  
Old 25th December 2018
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Thanks for the correction!
Reply With Quote
  #5   (View Single Post)  
Old 13th January 2019
rdikarlus rdikarlus is offline
Real Name: Carlosn
Fdisk Soldier
 
Join Date: Nov 2018
Location: IBZ ISLAND
Posts: 63
Default

It's working now, thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenSMTPD as a GMail relay backrow OpenBSD General 1 25th December 2011 07:22 PM


All times are GMT. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick