6.3 not coming from proper domains

2018-12-26 Thread Chris Bennett
Oops, I forgot to su -l first.
Send back to ch...@bennettconstruction.us

To: misc@opensmtpd.org
Subject: 6.3 not coming from proper domains

I am also working on 6.4 syntax to be used shortly, but after doing testing.
Right now, with 6.3amd64-stable,
I am not getting any emails sent from any domains except bennettconstruction.us.

6.3 files soon to be gone, but this is the set of files I have in production.
I can also send my 6.4 files, which may be much better, but I want to fix this
now, vs later.
I appreciate any help. I think I included everything. mail-to address is 
designed to fail
in order to get good log messages.

Thanks,
Chris Bennett

gory ~ # dig -tANY bennettconstruction.us

; <<>> DiG 9.4.2-P2 <<>> -tANY bennettconstruction.us
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42993
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;bennettconstruction.us.IN  ANY

;; ANSWER SECTION:
bennettconstruction.us. 833 IN  A   104.217.196.250
bennettconstruction.us. 833 IN  NS  ns65.domaincontrol.com.
bennettconstruction.us. 833 IN  NS  ns66.domaincontrol.com.

;; Query time: 459 msec
;; SERVER: 192.168.43.1#53(192.168.43.1)
;; WHEN: Wed Dec 26 19:47:25 2018
;; MSG SIZE  rcvd: 111

gory ~ # dig -tANY capuchado.com  

; <<>> DiG 9.4.2-P2 <<>> -tANY capuchado.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24176
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;capuchado.com. IN  ANY

;; ANSWER SECTION:
capuchado.com.  3600IN  TXT "v=spf1 a mx:capuchado.com 
ip4:104.217.196.251 ~all"
capuchado.com.  3600IN  MX  10 capuchado.com.
capuchado.com.  600 IN  SOA ns65.domaincontrol.com. 
dns.jomax.net. 2018121317 28800 7200 604800 600
capuchado.com.  3600IN  A   104.217.196.251
capuchado.com.  3600IN  NS  ns66.domaincontrol.com.
capuchado.com.  3600IN  NS  ns65.domaincontrol.com.

;; Query time: 847 msec
;; SERVER: 192.168.43.1#53(192.168.43.1)
;; WHEN: Wed Dec 26 19:47:58 2018
;; MSG SIZE  rcvd: 227

gory ~ # dig -tANY line-printer-daemon.net

; <<>> DiG 9.4.2-P2 <<>> -tANY line-printer-daemon.net
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40266
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;line-printer-daemon.net.   IN  ANY

;; ANSWER SECTION:
line-printer-daemon.net. 3600   IN  TXT "v=spf1 a 
mx:line-printer-daemon.net ip4:104.217.196.252 ~all"
line-printer-daemon.net. 3600   IN  MX  10 line-printer-daemon.net.
line-printer-daemon.net. 600IN  SOA ns63.domaincontrol.com. 
dns.jomax.net. 2018122000 28800 7200 604800 600
line-printer-daemon.net. 3600   IN  A   104.217.196.252
line-printer-daemon.net. 3600   IN  NS  ns64.domaincontrol.com.
line-printer-daemon.net. 3600   IN  NS  ns63.domaincontrol.com.

;; Query time: 710 msec
;; SERVER: 192.168.43.1#53(192.168.43.1)
;; WHEN: Wed Dec 26 19:48:54 2018
;; MSG SIZE  rcvd: 247


maillog:

Dec 26 19:27:36 bennettconstruction smtpd[37757]: smtp-out: Failed to resolve 
MX for [relay:openspf.net]: No MX found for domain
Dec 26 19:27:36 bennettconstruction smtpd[37757]:  mta 
event=delivery evpid=5a4d097a06f98d40 from= 
to= rcpt=<-> source="-" relay="openspf.net" delay=6m40s 
result="TempFail" stat="No MX found for domain"
Dec 26 19:32:13 bennettconstruction smtpd[37757]: smtp-out: Failed to resolve 
MX for [relay:openspf.net]: No MX found for domain
Dec 26 19:32:13 bennettconstruction smtpd[37757]:  mta 
event=delivery evpid=6d1d125a0d253a0b from= 
to= rcpt=<-> source="-" relay="openspf.net" delay=6m40s 
result="TempFail" stat="No MX found for domain"

Dec 26 19:20:56 bennettconstruction smtpd[37757]: 0da5075771ad38fb smtp 
event=connected address=local host=bennettconstruction.us
Dec 26 19:20:56 bennettconstruction smtpd[37757]: 0da5075771ad38fb smtp 
event=message address=local host=bennettconstruction.us msgid=5a4d097a 
from= to= size=509 ndest=1 
proto=ESMTP
Dec 26 19:20:56 bennettconstruction smtpd[37757]: 0da5075771ad38fb smtp 
event=closed address=local host=bennettconstruction.us reason=quit
Dec 26 19:20:56 bennettconstruction smtpd[37757]: smtp-out: Failed to resolve 
MX for [relay:openspf.net]: No MX found for domain
Dec 26 19:20:56 bennettconstruction smtpd[37757]:  mta 
event=delivery evpid=5a4d097a06f98d40 from= 
to= rcpt=<-> source="-" relay="openspf.net" delay=0s 
result="TempFail" stat="No MX found for domain"
Dec 26 19:25:33 bennettconstruction smtpd[37757]: 0da5075a75a18af0 smtp 
event=connected address=local host=bennettconstruction.us
Dec 26 19:25:33 

Re: different lmtp destinations from table for mail delivery depending on email address

2018-12-26 Thread Gilles Chehade
Doable with OpenSMTPD using multiple actions and using the rcpt-to matching 
criteria, however it feels kind of hackish to do it at that level.

Basically you would create one action per dovecot shard, then one match per 
shard with an rcpt-to criteria pointing to a table containing the recipients 
for that shard.

I’d do that in dovecot myself.

Cheers,


> On 26 Dec 2018, at 22:24, mabi  wrote:
> 
> Hello,
> 
> I would like to setup one OpenSMTPD server as MX server for incoming mails 
> and have OpenSMTPD deliver the mail to different Dovecot mailbox servers 
> using LTMP depending on the e-mail address of the recipient.
> 
> Would this kind of setup be possible to do using the table-postgresql extra 
> addon? I would then have a table in my database where the recipient email 
> address is mapped to a respective mailbox server name (email1 -> server1, 
> email2 -> server2, etc.).
> 
> Right now I use the following action:
> 
> action "dovecot" lmtp "server1:24" rcpt-to virtual 
> 
> which basically only allows me to deliver to one single mailbox server.
> 
> If I guess I could still use Dovecot's LMTP proxying feature for that purpose 
> but I think it would be much smarter to do that in OpenSMTPD directly.
> 
> Anyone know if this is possible or have an alternative idea how to do that?
> 
> Best regards,
> Mabi
> 
> 
> 
> 
> -- 
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
> 


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



Re: different lmtp destinations from table for mail delivery depending on email address

2018-12-26 Thread Matt Schwartz
Delivery to other locations would be best handled inside of dovecot.
Dovecot allows override of delivery to different destinations in the user
database.

On Wed, Dec 26, 2018, 4:26 PM mabi  Hello,
>
> I would like to setup one OpenSMTPD server as MX server for incoming mails
> and have OpenSMTPD deliver the mail to different Dovecot mailbox servers
> using LTMP depending on the e-mail address of the recipient.
>
> Would this kind of setup be possible to do using the table-postgresql
> extra addon? I would then have a table in my database where the recipient
> email address is mapped to a respective mailbox server name (email1 ->
> server1, email2 -> server2, etc.).
>
> Right now I use the following action:
>
> action "dovecot" lmtp "server1:24" rcpt-to virtual 
>
> which basically only allows me to deliver to one single mailbox server.
>
> If I guess I could still use Dovecot's LMTP proxying feature for that
> purpose but I think it would be much smarter to do that in OpenSMTPD
> directly.
>
> Anyone know if this is possible or have an alternative idea how to do that?
>
> Best regards,
> Mabi
>
>
>
>
> --
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
>
>


different lmtp destinations from table for mail delivery depending on email address

2018-12-26 Thread mabi
Hello,

I would like to setup one OpenSMTPD server as MX server for incoming mails and 
have OpenSMTPD deliver the mail to different Dovecot mailbox servers using LTMP 
depending on the e-mail address of the recipient.

Would this kind of setup be possible to do using the table-postgresql extra 
addon? I would then have a table in my database where the recipient email 
address is mapped to a respective mailbox server name (email1 -> server1, 
email2 -> server2, etc.).

Right now I use the following action:

action "dovecot" lmtp "server1:24" rcpt-to virtual 

which basically only allows me to deliver to one single mailbox server.

If I guess I could still use Dovecot's LMTP proxying feature for that purpose 
but I think it would be much smarter to do that in OpenSMTPD directly.

Anyone know if this is possible or have an alternative idea how to do that?

Best regards,
Mabi




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



Re: connect to cyrus lmtp with "as user"

2018-12-26 Thread Gilles Chehade
On Wed, Dec 26, 2018 at 05:37:49PM +0100, Peter J. Philipp wrote:
> Hi,
> 
> I'm somewhat at a dillema.  I'm on OpenBSD 6.3 and upgraded the CVS tree for
> smtpd to -current.  With this I wanted to achieve configuring the smtpd for
> an upgrade to 6.4.  However my old config does not fit after having translated
> it to 6.4 syntax.
> 
> The host in question is an internal LAN host that fetchmail's mail from my VPS
> and inserts it into cyrus imapd so that the LAN here can use IMAP.  The line
> in the smtpd.conf used to say this:
> 
> accept for local alias  deliver to lmtp "/var/imap/socket/lmtp" as 
> _cyrus
> 
> And the new action I have this:
> 
> action "local" lmtp "/var/imap/socket/lmtp" alias 
> 

from the smtpd.conf(5) man page:


 The local delivery methods support additional options:

 [...]

 user username
 Specify the username for performing the delivery, to be
 looked up with getpwnam(3).

 This is used for virtual hosting where a single username
 is in charge of handling delivery for all virtual users.

 This option is not usable with the mbox delivery method.



-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg

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



Re: connect to cyrus lmtp with "as user"

2018-12-26 Thread Peter J. Philipp
On Wed, Dec 26, 2018 at 05:37:49PM +0100, Peter J. Philipp wrote:
>  78041 mail.lmtp NAMI  "/var/imap/socket/lmtp"
>  78041 mail.lmtp RET   connect -1 errno 13 Permission denied
> 
> Does anyone know off hand how to fix this, either on smtpd or on cyrus's side?
> 
> Thanks a lot and seasons greetings,
> -peter

Ahh never mind.  I checked the path and it was in /var/imap that the 
permissions were at 750 by default.  I changed them to 755 and now it works.

Regards,
-peter

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



Re: What if sender is a network?

2018-12-26 Thread Gilles Chehade
On Wed, Dec 26, 2018 at 11:18:33AM +0300, Tevfik Ceydeliler wrote:
> Hi,
> 
> I try to configure smtpd.conf file
> 
> I have some conf line that works successfully like that:
> 
> accept from source { 10.65.8.100 } sender { "@test.com" } for domain {
> anothertests.com } relay
> 
> It is OK for one IP address. But I try to do?? with a subnet such as sources
> is 10.65.8.0/24 or range from 10.65.8.1 to 10.65.8.255 . How can I to do it?
> 
> To do, should I enter 255 IP address one by one or is there any other
> parameter?
> 

quoting the man page:

 [!] from src address | 
 Specify that session may only originate from string or
 list table address which can be a specific address or a
 subnet expressed in CIDR-notation.

you're using an older version of OpenSMTPD, but it worked the same.

-- 
Gilles Chehade @poolpOrg

https://www.poolp.org tip me: https://paypal.me/poolpOrg

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



What if sender is a network?

2018-12-26 Thread Tevfik Ceydeliler

Hi,

I try to configure smtpd.conf file

I have some conf line that works successfully like that:

accept from source { 10.65.8.100 } sender { "@test.com" } for domain { 
anothertests.com } relay


It is OK for one IP address. But I try to do  with a subnet such as 
sources is 10.65.8.0/24 or range from 10.65.8.1 to 10.65.8.255 . How can 
I to do it?


To do, should I enter 255 IP address one by one or is there any other 
parameter?


regards,