Receiving broken e-mails?

2015-07-25 Thread Herbert J. Skuhra
Hi,

anyone else who is running OpenSMTPD on FreeBSD receive broken
e-mails? In tcpdump/wireshark the message looks ok, but in the trace log
the lines are broken. Receiving the same message with Postfix works!

Btw. OpenSMTPD portable from git does not compile for a while unless I
add #define HAVE_ERR_H 1 to config.h.

Thanks.

-- 
Herbert

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



[Extras] Problems with sqlite tables

2015-07-25 Thread James Lott

Hey folks,

I'm running OpenSMTPD 5.7.1 + table-sqlite from extras. I'm simply 
trying to get the sqlite tables to work at all. I haven't even gotten as 
far as trying to use them in my rules. I have the following config files:


== smtpd.conf
table aliases file:/etc/mail/aliases
table mxdb  sqlite:/usr/local/etc/mail-config/mxdb/smtpd.sqlite.conf
listen on localhost port 2587
accept for local alias aliases deliver to mbox
accept for any relay

==smtpd.sqlite.conf
dbpath   /usr/local/var/mxdb.sqlite
query_domainselect name from domain where domain = ?
query_alias select destination from alias where 
alias_user||'@'||alias_domain = ?


OpenSMTPD will pass the config tests and start, but will then 
immediately die.


Jul 25 10:36:36 smtp smtpd[61374]: info: OpenSMTPD 5.7.1p1 starting
Jul 25 10:36:36 smtp smtpd[61375]: info: startup [debug mode]
Jul 25 10:36:36 smtp smtpd[61378]: warn: table-proc: pipe closed
Jul 25 10:36:36 smtp smtpd[61378]: fatal: table-proc: exiting
Jul 25 10:36:36 smtp smtpd[61376]: warn: queue - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61377]: warn: control - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61375]: warn: parent - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61380]: warn: pony - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61379]: warn: scheduler - queue: pipe closed
Jul 25 10:36:36 smtp smtpd[61381]: warn: ca - control: pipe closed

Smtpd will start and run just fine if I comment out the table mxdb line.

This issue is being experienced on FreeBSD 10.1. Am I doing something 
wrong that anyone might be able to point to? Thanks in advance for any 
pointers!


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Receiving broken e-mails?

2015-07-25 Thread Seth
On Sat, 25 Jul 2015 01:27:00 -0700, Herbert J. Skuhra  
herb...@oslo.ath.cx wrote:

anyone else who is running OpenSMTPD on FreeBSD receive broken
e-mails? In tcpdump/wireshark the message looks ok, but in the trace log
the lines are broken. Receiving the same message with Postfix works!


I haven't seen problem of this sort so far, but I don't have any public  
facing FreeBSD/OpenSMTPD servers, the ones I do have all sit behind  
OpenBSD/OpenSMTPD relays.


When you say 'broken' what exactly does that mean? Only part of the  
message is delivered instead of A complete one?



Btw. OpenSMTPD portable from git does not compile for a while unless I
add #define HAVE_ERR_H 1 to config.h.


Reproduced the build error and success of your workaround on a FreeBSD 9x  
system.



--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: [Extras] Problems with sqlite tables

2015-07-25 Thread James Lott
Interestingly, it looks to me like opensmtpd does actually check the 
/usr/local/libexec/opensmtpd directory for modules. When I remove the 
module from that directory, smtpd does not even start anymore (as 
opposed to starting and instantly giving up).


root@smtp:/usr/local/etc/mail-config # mv 
/usr/local/libexec/opensmtpd/table-sqlite /usr/libexec/smtpd/

root@smtp:/usr/local/etc/mail-config # service smtpd onestart
Performing sanity check on smtpd configuration:
fatal: table_create: backend sqlite does not exist
/usr/local/etc/rc.d/smtpd: WARNING: failed precmd routine for smtpd

If that path is hardcoded in the upstream OpenSMTPD source, then I would 
guess I'm dealing with a patched codebase... I guess I'll have to try 
grabbing the upstream sources directly and see if I run into the same 
issue.


On 07/25/2015 12:08 PM, Joerg Jung wrote:

On Sat, Jul 25, 2015 at 10:52:36AM -0700, James Lott wrote:

Hey folks,

I'm running OpenSMTPD 5.7.1 + table-sqlite from extras. I'm simply trying to
get the sqlite tables to work at all. I haven't even gotten as far as trying
to use them in my rules. I have the following config files:

== smtpd.conf
table aliases file:/etc/mail/aliases
table mxdb  sqlite:/usr/local/etc/mail-config/mxdb/smtpd.sqlite.conf
listen on localhost port 2587
accept for local alias aliases deliver to mbox
accept for any relay

==smtpd.sqlite.conf
dbpath   /usr/local/var/mxdb.sqlite
query_domainselect name from domain where domain = ?
query_alias select destination from alias where
alias_user||'@'||alias_domain = ?

OpenSMTPD will pass the config tests and start, but will then immediately
die.

Jul 25 10:36:36 smtp smtpd[61374]: info: OpenSMTPD 5.7.1p1 starting
Jul 25 10:36:36 smtp smtpd[61375]: info: startup [debug mode]
Jul 25 10:36:36 smtp smtpd[61378]: warn: table-proc: pipe closed
Jul 25 10:36:36 smtp smtpd[61378]: fatal: table-proc: exiting
Jul 25 10:36:36 smtp smtpd[61376]: warn: queue - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61377]: warn: control - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61375]: warn: parent - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61380]: warn: pony - lka: pipe closed
Jul 25 10:36:36 smtp smtpd[61379]: warn: scheduler - queue: pipe closed
Jul 25 10:36:36 smtp smtpd[61381]: warn: ca - control: pipe closed

Smtpd will start and run just fine if I comment out the table mxdb line.

I'm not sure, but I have a guess for you:

I think -extras configure.ac has a bug where tables, filters, etc
are installed in $prefix/libexec/opensmtpd

But smtpd explicitly looks in (hardcoded) /usr/libexec/smtpd for them.

Thus, your table-sqlite is not loaded correctly and smtpd dies.

Regards,
Joerg

  

This issue is being experienced on FreeBSD 10.1. Am I doing something wrong
that anyone might be able to point to? Thanks in advance for any pointers!

--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org