opensmtp refuses to start after update

When I tried to restart opensmtp after an update, I get this error
Code:
Starting smtpd.
83926: fatal: ssl_init: cannot load certificate store: No such file or directory
/usr/local/etc/rc.d/smtpd: WARNING: failed to start smtpd

pkg updating did mention there where some changes, that needed attention. But it wasn't clear about what those changes actually where.
Code:
20130102:
  AFFECTS: users of mail/opensmtpd
  AUTHOR: ashish@FreeBSD.org

  OpenSMTPD port has been updated to the latest portable snapshot. There 
  has been several changes to the configuration between the last version
  and this version, which requires configuration file need to be reviewed.

Here is my /usr/local/etc/mail/smtpd.conf
Code:
listen on 127.0.0.1
listen on ::1

map "aliases" { source db "/usr/local/etc/mail/aliases.db" }
map "secrets" { source db "/usr/local/etc/mail/secrets.db" }

accept for all relay via "mail.mydomain.com"

Any idea what is the cause of this error and how to fix it?
 
Hi,

This was a bug in the previous snapshot, it has been fixed in the snapshot published yesterday. Hopefully the port maintainer will update soon ;-)

Gilles
 
Ah. Well, in that case I'll just wait.

Fortunately opensmtp is only used to mail some critical log reports. So, as long there are no drive crashes or anything, I'll be fine ;)
 
gilles said:
Hi,

This was a bug in the previous snapshot, it has been fixed in the snapshot published yesterday. Hopefully the port maintainer will update soon ;-)

Gilles

Gilees! Where did you get this information? I can not find.
 
k-nike, I know because I cheated: I'm one of the developers and I tend to be the one releasing the snapshots ;-)
 
gilles said:
k-nike, I know because I cheated: I'm one of the developers and I tend to be the one releasing the snapshots ;-)
Ok :)

This information can be found somewhere on the official website? Is opensmtpd.org old?
 
We're working *very* actively on it so we don't keep the website updated about changes in the snapshots (they are published every few days, sometimes very close because we spot a bug early), we just update the link to download them on the portable.html page.

However, we have a mailing list where we advertise and mention changes between snapshots. We're also present on IRC (#opensmtpd @ freenode) where we discuss devel and help users :)
 
I just updated opensmtp on another server. Same problem. :\

I figured this issue would be fixed by now :(
 
Finally, the port has been updated to opensmtpd-201301111154.
How to change the line is responsible for forwarding via gmail.com?

Old version:
Code:
accept for all relay via tls+auth://smtp.gmail.com:587 auth secrets as [email]name@domain.com[/email]
New version:
Code:
accept for all relay via smtp.gmail.com port 587 tls auth <secrets> as [email]name@domain.com[/email]
Syntax error!

smtpd.conf:
Code:
listen on lo0

expire 3d

table aliases db:/etc/mail/aliases.db
table secrets db:/etc/mail/secrets.db

accept for local alias <aliases> deliver to mbox

accept for all relay via smtp.gmail.com port 587 tls auth "secrets" as [email]name@domain.com[/email]
 
Updated to opensmtpd-201301191220, started with the following:
Code:
listen on lo0

expire 3d

table aliases db:/etc/mail/aliases.db
table secrets db:/etc/mail/secrets.db

accept for local alias <aliases> deliver to mbox

accept for any relay via tls://smtp.gmail.com:587 auth <secrets>

When sending any message, I get an error:
Code:
Jan 21 10:50:55 gate smtpd[89668]: smtp-in: New session 0000000201259d91 from host 0@localhost [local]
Jan 21 10:50:55 gate smtpd[89668]: smtp-in: Accepted message d35ef0ba on session 0000000201259d91: from=<root@domain.com>, size=202, nrcpts=1, proto=ESMTP
Jan 21 10:50:55 gate smtpd[89668]: smtp-in: Closing session 0000000201259d91
Jan 21 10:50:55 gate smtpd[89665]: smtp-out: Error on route [] <-> IPv6:2a00:1450:4010:c03::6c (la-in-x6c.1e100.net): Connection failed: No route to host

IPv6 is not set up on my PC!
 
I experience syntax errors too
Code:
Starting smtpd.
/usr/local/etc/mail/smtpd.conf:4: syntax error
/usr/local/etc/mail/smtpd.conf:7: syntax error
27188: warn: no rules, nothing to do
/usr/local/etc/rc.d/smtpd: WARNING: failed to start smtpd

smtpd.conf
Code:
listen on 127.0.0.1
listen on ::1

map "aliases" { source db "/usr/local/etc/mail/aliases.db" }
map "secrets" { source db "/usr/local/etc/mail/secrets.db" }

accept for all relay via "internal.mail.server"
How should I change this? Google wasn't much help :\
 
mariourk,

smtpd.conf:
Code:
listen on 127.0.0.1
listen on ::1

table aliases db:/usr/local/etc/mail/aliases.db
table secrets db:/usr/local/etc/mail/secrets.db

accept for any relay via tls+auth://[B]your_phrase[/B]@smtp.gmail.com:587 auth <secrets> #for example

secret:
Code:
your_phrase  gmail_username:gmail_password

But current port opensmtpd-201301191220 has an error. Gmail is not working.
 
After changing smtp.conf to this, it worked:
Code:
listen on 127.0.0.1
listen on ::1

accept for any relay via "internal.mail.server"
I removed the aliases and secrets reference, because they didn't exist anyway. And I want opensmtp to replay everything to another mailserver. So, those wheren't really needed. I also had to change all to any in the last line.
 
I too am unable to receive emails from my server to gmail after I updated last night.

Here is /var/log/maillog:
Code:
Jan 31 08:09:31 hoth smtpd[4349]: smtp-out: Connected on session 00000036d3a53d44
Jan 31 08:09:31 hoth smtpd[4349]: smtp-out: Error on session 00000036d3a53d44: IO Error: Connection refused
Jan 31 08:09:31 hoth smtpd[4349]: smtp-out: Too many errors on host 173.194.70.26 (fa-in-f26.1e100.net): ignoring this MX

What do I need to do?
 
On second thought, I would like to use aliases. But I have no idea what the correct syntax is.

This is apparently the wrong syntax:
Code:
map "secrets" { source db "/usr/local/etc/mail/secrets.db" }

And this:
Code:
table aliases db:/usr/local/etc/mail/aliases.db
give the following error:
Code:
invalid backend configuration for table aliases

How can I fix this? :(
 
Here is my smtpd.conf:

Code:
listen on 127.0.0.1
listen on ::1

map "aliases" { source db "/usr/local/etc/mail/aliases.db" }
map "secrets" { source db "/usr/local/etc/mail/secrets.db" }


accept for local alias aliases deliver to mbox
accept for all relay via ssl+auth://smtp.googlemail.com:465 auth secrets as something@something

Here is what I get when I try to [cmd=]service smtpd start[/cmd]
Code:
Starting smtpd.
/usr/local/etc/mail/smtpd.conf:6: syntax error
/usr/local/etc/mail/smtpd.conf:10: invalid use of table "<dynamic:5>" as ALIAS parameter
/usr/local/etc/mail/smtpd.conf:11: syntax error
4511: warn: no rules, nothing to do
/usr/local/etc/rc.d/smtpd: WARNING: failed to start smtpd
 
mariourk said:
How can I fix this? :(
You need to create a aliases.db file using opensmtpd:
Code:
cd /usr/local/etc/mail
/usr/local/libexec/opensmtpd/makemap aliases
Similarly for file secrets.db
 
herot said:
Here is my smtpd.conf:

Code:
listen on 127.0.0.1
listen on ::1

map "aliases" { source db "/usr/local/etc/mail/aliases.db" }
map "secrets" { source db "/usr/local/etc/mail/secrets.db" }


accept for local alias aliases deliver to mbox
accept for all relay via ssl+auth://smtp.googlemail.com:465 auth secrets as something@something

Here is what I get when I try to [cmd=]service smtpd start[/cmd]
Code:
Starting smtpd.
/usr/local/etc/mail/smtpd.conf:6: syntax error
/usr/local/etc/mail/smtpd.conf:10: invalid use of table "<dynamic:5>" as ALIAS parameter
/usr/local/etc/mail/smtpd.conf:11: syntax error
4511: warn: no rules, nothing to do
/usr/local/etc/rc.d/smtpd: WARNING: failed to start smtpd

smtpd.conf:
Code:
listen on lo0

expire 3d

table aliases db:/usr/local/etc/mail/aliases.db
table secrets db:/usr/local/etc/mail/secrets.db

accept for local alias <aliases> deliver to mbox

accept for any relay via tls+auth://your_phrase@smtp.gmail.com:587 auth <secrets> as something@something

secrets:
Code:
your_phrase  gmail_username:gmail_password

It works for me in this configuration. opensmtpd-201301312105
 
k-nike said:
smtpd.conf:
Code:
listen on lo0

expire 3d

table aliases db:/usr/local/etc/mail/aliases.db
table secrets db:/usr/local/etc/mail/secrets.db

accept for local alias <aliases> deliver to mbox

accept for any relay via tls+auth://your_phrase@smtp.gmail.com:587 auth <secrets> as something@something

secrets:
Code:
your_phrase  gmail_username:gmail_password

It works for me in this configuration. opensmtpd-201301312105

What does "your_phrase" mean?
 
herot said:
What does "your_phrase" mean?

It is a label.
File can have multiple entries for different servers.
For example:
Code:
label1  gmail_username:gmail_password
label2  hotmail_username:hotmail_password
...
 
I still can't get my mail working. Here are my files:

smtpd.conf
Code:
listen on 127.0.0.1
listen on ::1

table aliases db:/usr/local/etc/mail/aliases.db
table secrets db:/usr/local/etc/mail/secrets.db

accept for local alias <aliases> deliver to mbox

accept for any relay via tls+auth://creds@smtp.gmail.com:587 auth <secrets> as someone@somewhere

aliases
Code:
hoth# cat secrets
creds    someone@gmail.com:lalalalasomething

I am getting:
Code:
Feb  6 07:51:26 hoth smtpd[21432]: warn: pipe error with lka
Feb  6 07:51:26 hoth smtpd[21431]: warn: pipe error with control

What am I missing?
 
Is this a problem: ?
Code:
# $FreeBSD: release/9.0.0/etc/mail/mailer.conf 93858 2002-04-05 04:25:14Z gshapiro $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
###sendmail     /usr/libexec/sendmail/sendmail
###send-mail    /usr/libexec/sendmail/sendmail
###mailq                /usr/libexec/sendmail/sendmail
###newaliases   /usr/libexec/sendmail/sendmail
###hoststat     /usr/libexec/sendmail/sendmail
###purgestat    /usr/libexec/sendmail/sendmail
sendmail        /usr/local/sbin/smtpctl
send-mail       /usr/local/sbin/smtpctl
mailq           /usr/local/sbin/smtpctl
makemap         /usr/local/libexec/opensmtpd/makemap
newaliases      /usr/local/libexec/opensmtpd/makemap
 
herot,

1. /etc/mail/mailer.conf is right!
2. smtpd.conf is right!
3. secrets is right! but i use username without @gmail.com
4. you need create secrets.db. i use command:
Code:
cd /usr/local/etc/mail
/usr/local/libexec/opensmtpd/makemap secrets
5. similarly, you must create aliases.db
Code:
/usr/local/libexec/opensmtpd/makemap aliases
or delete this line:
Code:
table aliases db:/usr/local/etc/mail/aliases.db
6. restart opensmtpd:
Code:
/usr/local/etc/rc.d/smtpd restart
 
Knight didn't work.

results:
Code:
hoth# cat maillog
Feb  7 00:00:00 hoth newsyslog[25372]: logfile turned over
Feb  7 07:58:05 hoth smtpd[26538]: info: startup
Feb  7 07:58:05 hoth smtpd[26538]: warn: lost child: lookup exited abnormally
Feb  7 07:58:05 hoth smtpd[26541]: info: mail delivery agent exiting
Feb  7 07:58:05 hoth smtpd[26543]: info: mail transfer agent exiting
Feb  7 07:58:05 hoth smtpd[26545]: info: scheduler handler exiting
Feb  7 07:58:05 hoth smtpd[26539]: info: control process exiting
Feb  7 07:58:05 hoth smtpd[26542]: info: mail filter exiting
Feb  7 07:58:05 hoth smtpd[26544]: info: queue handler exiting
Feb  7 07:58:05 hoth smtpd[26546]: fatal: msgbuf_write: Socket is not connected
Feb  7 07:58:05 hoth smtpd[26538]: warn: parent terminating
 
Back
Top