DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th June 2022
rdikarlus rdikarlus is offline
Real Name: Carlosn
Fdisk Soldier
 
Join Date: Nov 2018
Location: IBZ ISLAND
Posts: 63
Default smtpd configuration issues

Hi all,

trying to configure smtpd on OpenBSD current. The server was sending mails using gmail smtp with no problem till gmail stopped using the less secure applications facility... now I am trying to configure with my company mail configuration. Basically I want the servers to send periodically system information. Here's my configuration;

/etc/mail/smtpd.conf

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://LABEL@smtp.XXXXX.com:587 auth <secrets>
match for local action "local"
match for any action "relay"


And /etc/screts

LABEL mymail@XXXXX.com:mypasswd


smtpd is not sending mails anymore... the same configuration was working using a gmail account... any idea where's the problem ?


I appreciate your help,
Reply With Quote
  #2   (View Single Post)  
Old 25th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I don't see any obvious logic errors.

There's always the possibility that smtp.XXXXX.com is not resolvable, or that the remote server is rejecting mail from your server.

Review the contents of /var/log/maillog. If there's nothing obvious there, you can stop run the smtpd(8) daemon and then run it manually from a shell with `-dv` to get a great deal of console output while mail is being processed.

You might want to change your "local" action to some other action name that is not a reserved word -- the example in the smtpd.conf(5) man page, the author used "local_mail". In my own configurations I use the action name "deliver" for mail delivered on the local system.
Reply With Quote
  #3   (View Single Post)  
Old 26th June 2022
rdikarlus rdikarlus is offline
Real Name: Carlosn
Fdisk Soldier
 
Join Date: Nov 2018
Location: IBZ ISLAND
Posts: 63
Default

Thanks for your help.

after Checking /var/log/maillog , this seems to be the error:

25169039c23384d6 mta error reason=IO Error: certificate verification failed: error number 1

Any idea how to solve this?

Thanks,
Reply With Quote
  #4   (View Single Post)  
Old 26th June 2022
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 335
Default

Gmail stopped me all of a sudden getting and sending mail.
Gmail is not now, or will not soon, allow what they consider less secure aps connect to gmail server without following their new guidelines. In my case it was neomutt and getmail. if this "might" be a similar issue there was a discussion here where the last entry by me was the correct one. I am probably way off the mark but figure i'd throw my 2 cents in.

Last edited by frcc; 26th June 2022 at 11:03 AM.
Reply With Quote
  #5   (View Single Post)  
Old 26th June 2022
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default

Quote:
25169039c23384d6 mta error reason=IO Error: certificate verification failed: error number 1,
What kind of certificate are you using?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 26th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

You are connecting to the remote server with "smtp+tls" -- this is a mandatory TLS connection. The issue is either:
  • The remote server's certificate is not accepted by your local server.
  • The remote server requires a valid certificate from your local server.
As a next step, I would run smtpd(8) with -dv to try to obtain further clarity as to which is the case. If the results from that are unclear, then I recommend contacting your remote server's technical support team. For example, using "tls no-verify" might be a temporary solution but you would want to determine if there is a protocol or cipher issue between the two mail servers.

Last edited by jggimi; 26th June 2022 at 12:18 PM. Reason: clarity
Reply With Quote
  #7   (View Single Post)  
Old 27th June 2022
rdikarlus rdikarlus is offline
Real Name: Carlosn
Fdisk Soldier
 
Join Date: Nov 2018
Location: IBZ ISLAND
Posts: 63
Default

Hi all,

thanks for your replies and comments but it seems that my mail server does not like smtpd, so that I downloaded, compiled and installed the simple MTA ssmtp - https://github.com/ajwans/sSMTP - and my server is sending mails again. Despite this software is not in the OpneBSD ports tree it compliles straightaway. In case you are interested I configured my server as follows: I stopped the smtpd daemon - #rcctl stop smtpd - and did #rcctl disable smtpd in order not to start it when the server boots again. I also changed the file /etc/mailer.conf like this:

# $OpenBSD: mailer.conf,v 1.7 2015/12/07 12:32:06 sunil Exp $
#
# Execute the "real" sendmail program, which is now smtpd by default
#
#sendmail /usr/sbin/smtpctl
#send-mail /usr/sbin/smtpctl
#mailq /usr/sbin/smtpctl
#makemap /usr/sbin/smtpctl
#newaliases /usr/sbin/smtpctl


sendmail /usr/local/sbin/ssmtp
send-mail /usr/local/sbin/ssmtp
mailq /usr/local/sbin/ssmtp
makemap /usr/local/sbin/ssmtp
newaliases /usr/local/sbin/ssmtp


Basically you must tell the server to use ssmtp instead of smtpctl.

Thanks again for you help!

Last edited by rdikarlus; 27th June 2022 at 02:46 PM.
Reply With Quote
  #8   (View Single Post)  
Old 27th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by rdikarlus View Post
...it seems that my mail server does not like smtpd
It could be the other way around instead. Perhaps smtpd does not like your remote mail server.
Quote:
Thanks again for you help!
Uh ... ... we didn't. You found a circumvention without us.

Congratulations on establishing your mail server connection!
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
nginx configuration issues pseudostem OpenBSD Packages and Ports 5 22nd June 2022 03:08 AM
snmpd vs. net-snmp configuration issues MatthiasKoch OpenBSD General 3 28th April 2016 07:01 AM
smtpd as a relay bceverly OpenBSD General 13 7th October 2015 04:52 PM
Help with smtpd as a relay rjdelacr OpenBSD General 5 6th October 2015 08:48 PM
Switched over from sendmail(8) to smtpd(8) by default. gpatrick OpenBSD General 0 5th October 2014 03:56 PM


All times are GMT. The time now is 08:05 AM.


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