Re: Virtual domains/users setup with smtpd.

2010-05-17 Thread Gilles Chehade
Ok, I understand now, this should work indeed, probably a small regression
in recent code, will look into it tomorrow and come up with a fix.

Gilles


On Mon, May 17, 2010 at 04:27:19PM -0400, Daniel Ouellet wrote:
> On 5/17/10 4:41 AM, Gilles Chehade wrote:
> >You are confusing me :-)
> 
> I am very sorry! That's the last thing I want to do.
> 
> So, I will try to make it very short and as clear as I can. (;>
> 
> I simplify the configuration to the minimum and as I still not able to 
> get the virtual part working, I try something below that is simple and 
> appear to be logical to me. If I am wrong, then take the 20 pound hammer 
> and beat me over the head with it. I can't see it!
> 
> 
> 
> if I have the following smtpd.conf:
> 
> 
> listen on "lo0"
> listen on "dc0"
> 
> map "vdomains" { source db "/etc/mail/vdomains.db" }
> 
> accept from all for local deliver to mbox
> 
> #accept from all for domain "opensipd.com" deliver to mbox
> #accept from all for virtual "vdomains" deliver to mbox
> 
> accept for all relay
> 
> 
> The only two things I will do here between the restart of smtpd are to 
> either comment out only one or the other below:
> 
> #accept from all for domain "opensipd.com" deliver to mbox
> #accept from all for virtual "vdomains" deliver to mbox
> 
> one at a time to test it.
> 
> With
> 
> accept from all for domain "opensipd.com" deliver to mbox
> #accept from all for virtual "vdomains" deliver to mbox
> 
> No other changes, I can send email to
> 
> r...@opensipd.com
> 
> and I get it into the root local account.
> 
> That works.
> 
> now, if I reverse it:
> 
> #accept from all for domain "opensipd.com" deliver to mbox
> accept from all for virtual "vdomains" deliver to mbox
> 
> I should be able to get the email in the same local root account if the 
> vdomains have the following in it:
> 
> # cat vdomains
> r...@opensipd.com root
> 
> and I had created the vdomains.db with the makemap as this:
> 
> # /usr/libexec/smtpd/makemap -t aliases vdomains
> 
> Am I not understanding this properly?
> 
> It got to work right?
> 
> But it doesn't. I always get the error:
> 
> 530 5.0.0 Recipient rejected: r...@opensipd.com
> 
> I haven't been able to get the virtual to works once and I can't say how 
> many variation I did. Way to many to list them and a few totally stupid 
> as well, but just in case I tried.
> 
> So, isn't the above is valid and should work as a simple test?
> 
> Daniel

-- 
Gilles Chehade
freelance developer/sysadmin/consultant

   http://www.poolp.org



Re: Virtual domains/users setup with smtpd.

2010-05-17 Thread Daniel Ouellet

On 5/17/10 4:41 AM, Gilles Chehade wrote:

You are confusing me :-)


I am very sorry! That's the last thing I want to do.

So, I will try to make it very short and as clear as I can. (;>

I simplify the configuration to the minimum and as I still not able to 
get the virtual part working, I try something below that is simple and 
appear to be logical to me. If I am wrong, then take the 20 pound hammer 
and beat me over the head with it. I can't see it!




if I have the following smtpd.conf:


listen on "lo0"
listen on "dc0"

map "vdomains" { source db "/etc/mail/vdomains.db" }

accept from all for local deliver to mbox

#accept from all for domain "opensipd.com" deliver to mbox
#accept from all for virtual "vdomains" deliver to mbox

accept for all relay


The only two things I will do here between the restart of smtpd are to 
either comment out only one or the other below:


#accept from all for domain "opensipd.com" deliver to mbox
#accept from all for virtual "vdomains" deliver to mbox

one at a time to test it.

With

accept from all for domain "opensipd.com" deliver to mbox
#accept from all for virtual "vdomains" deliver to mbox

No other changes, I can send email to

r...@opensipd.com

and I get it into the root local account.

That works.

now, if I reverse it:

#accept from all for domain "opensipd.com" deliver to mbox
accept from all for virtual "vdomains" deliver to mbox

I should be able to get the email in the same local root account if the 
vdomains have the following in it:


# cat vdomains
r...@opensipd.com root

and I had created the vdomains.db with the makemap as this:

# /usr/libexec/smtpd/makemap -t aliases vdomains

Am I not understanding this properly?

It got to work right?

But it doesn't. I always get the error:

530 5.0.0 Recipient rejected: r...@opensipd.com

I haven't been able to get the virtual to works once and I can't say how 
many variation I did. Way to many to list them and a few totally stupid 
as well, but just in case I tried.


So, isn't the above is valid and should work as a simple test?

Daniel



Re: Virtual domains/users setup with smtpd.

2010-05-17 Thread Gilles Chehade
You are confusing me :-)

On Fri, May 14, 2010 at 07:56:15PM -0400, Daniel Ouellet wrote:
>
> [...]
> 
> However for the original issue, still no virtual working yet.
> 
> One question that it bring to me however is this in the man page then:
> 
> -t type
> 
>   [...]
>
>  set  There is no mapped value - a map of this type will only
>   allow for the lookup of keys.  This format can be used
>   for building primary domain maps.
> 
> 
> When would the set type be use then?
>

The set type is used for primary domains so that you can have a single
rule:

map "bleh" { source plain "/etc/mail/primary" } 
accept for primary "bleh" deliver to mbox

handle new primary domains dynamically without having to reload the
ruleset.

Types no longer have a real meaning to smtpd as maps are always stored
raw since a recent commit. You can generate an aliases, virtual or
secrets map using makemap without a type, but providing a type ensures
that the file is syntaxically checked before the db is built.

 
> If this is for primary domain only, I assume this mean domain to be 
> deliver on the local server. If so, then the alias only is used to 
> create the account in that case. If so and you have test in the aliases 
> file, then test@ will answer for all the domains in on the server, not 
> only a specific one?
>

I do not understand this sorry :/

Gilles

-- 
Gilles Chehade
freelance developer/sysadmin/consultant

   http://www.poolp.org



Re: Virtual domains/users setup with smtpd.

2010-05-14 Thread Daniel Ouellet

On 5/14/10 9:10 AM, Owain G. ainsworth wrote:

You are missing "aliases" if you wish for your aliases to work.


For the alias it does, but the issue is for the virtual.

So changing:

accept from all for local deliver to mbox

to

accept from all for local alias "aliases" deliver to mbox

works yes.

I did put the URL for that correction in my original post:

http://www.mail-archive.com/misc@openbsd.org/msg90204.html

So, may be we should put into the man page as well for that example 
using alias then.


Here is a diff for that.
Index: smtpd.conf.5
===
RCS file: /cvs/src/usr.sbin/smtpd/smtpd.conf.5,v
retrieving revision 1.32
diff -N -u -p smtpd.conf.5
--- smtpd.conf.527 Apr 2010 14:39:24 -  1.32
+++ smtpd.conf.514 May 2010 23:44:49 -
@@ -332,7 +332,7 @@ would look like this:
 listen on lo0
 map aliases { source db "/etc/mail/aliases.db" }
 map secrets { source db "/etc/mail/secrets.db" }
-accept for local deliver to mbox
+accept for local alias aliases deliver to mbox
 accept for all relay via smtp.gmail.com tls enable auth
 .Ed
 .Pp


However for the original issue, still no virtual working yet.

One question that it bring to me however is this in the man page then:

-t type
  Specify the format of the resulting map file.  The default map
  format is suitable for storing simple, unstructured, key-to-value
  string associations.  However, if the mapped value has special
  meaning, as in the case of the virtual domains file, a suitable
  type must be provided.  The available output types are:

 aliases  The mapped value is a comma-separated list of mail
 destinations.  This format can be used for building user
 aliases and virtual domains files.

 set  There is no mapped value - a map of this type will only
  allow for the lookup of keys.  This format can be used
  for building primary domain maps.


When would the set type be use then?

If this is for primary domain only, I assume this mean domain to be 
deliver on the local server. If so, then the alias only is used to 
create the account in that case. If so and you have test in the aliases 
file, then test@ will answer for all the domains in on the server, not 
only a specific one?


I get the aliases type, but I do not get the set type here?

Best,

Daniel



Re: Virtual domains/users setup with smtpd.

2010-05-14 Thread Owain G. ainsworth
You are missing "aliases " if you wish for your aliases to 
work.

IIRC that is in the manpage.
--
-0-
Sent from my phone, sorry about the formatting.
- Original message -
> >B  B  B  B  B  B  B  B  B  ^^^--- unless you mention "from all", it will 
> >only accept from lo0
> >
> > > accept for domain "opensipd.com" deliver to mbox
> >B  B  B  B  B  B  B  B  B  ^^^--- same here
> >
> > > accept for all relay
> >B  B  B  B  B  B  B  B  B  ^^^--- but don't do it here
> >
>
> I had tried that before and no go.
>
> The only one that works is to root at the local hostname, or real users,
> no aliases what so ever being virtual or local one.
>
> Like r...@spamtrap.realconnect.com or r...@opensipd.com will do be in
> the local root mail account and that's the last two you can see in the
> log below showing it as well.
>
> Here are all the details:
>
> # hostname
> spamtrap.realconnect.com
> # cat /etc/mail/aliases | grep test
> test: dan...@presscom.net
> test2: root
> # newaliases
> /etc/mail/aliases: 56 aliases
> # cat /etc/mail/smtpd.conf
> listen on "lo0"
> listen on "dc0"
>
> map "aliases" { source db "/etc/mail/aliases.db" }
> map "virtual" { source db "/etc/mail/virtual.db" }
>
>
> accept from all for local deliver to mbox
> accept from all for virtual "virtual" deliver to mbox
> accept from all for domain "opensipd.com" deliver to mbox
> accept for all relay
> # cat virtual
> te...@opensipd.com: dan...@presscom.net
> te...@opensipd.com: root
> # /usr/libexec/smtpd/makemap -t aliases -o /etc/mail/virtual.db
> /etc/mail/virtual
> # pkill smtpd
> # smtpd -dv
> startup [debug mode]
> parent_send_config: configuring smtp
> parent_send_config_client_certs: configuring smtp
> parent_send_config_ruleset: reloading rules and maps
> smtp_setup_events: listen on IPv6:fe80:1::203:baff:fe10:6165 port 25
> flags 0x0 cert "dc0"
> smtp_setup_events: listen on 66.63.0.75 port 25 flags 0x0 cert "dc0"
> smtp_setup_events: listen on IPv6:fe80:4::1 port 25 flags 0x0 cert "lo0"
> smtp_setup_events: listen on IPv6:::1 port 25 flags 0x0 cert "lo0"
> smtp_setup_events: listen on 127.0.0.1 port 25 flags 0x0 cert "lo0"
> smtp: will accept at most 245 clients
> smtp_new: incoming client on listener: 0x4bd55800
> lookup_ptr 66.63.44.67
> lookup_ptr success
> session_pickup: greeting client
> command: EHLOB  B  args: host-2.ouellet.us
> command: MAIL FROMB  B  B  B  B  args:  SIZE=412
> session_rfc5321_mail_handler: sending notification to mfa
> smtp: got imsg_mfa_mail/rcpt
> smtp: imsg_queue_create_message returned
> command: RCPT TOB  B  B  B  B  B  B  args: 
> smtp: got imsg_mfa_mail/rcpt
> 1273835446.EG3NGPKJR7lFn6wJ: from=,
> relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0
> Recipient rejected: t...@spamtrap.realconnect.com)
> command: QUITB  B  args: (null)
> session_destroy: killing client: 0x437a8000
> smtp_new: incoming client on listener: 0x4bd55800
> lookup_ptr 66.63.44.67
> lookup_ptr success
> session_pickup: greeting client
> command: EHLOB  B  args: host-2.ouellet.us
> command: MAIL FROMB  B  B  B  B  args:  SIZE=413
> session_rfc5321_mail_handler: sending notification to mfa
> smtp: got imsg_mfa_mail/rcpt
> smtp: imsg_queue_create_message returned
> command: RCPT TOB  B  B  B  B  B  B  args: 
> smtp: got imsg_mfa_mail/rcpt
> 1273835453.XUkSzWxzYz9J9W5C: from=,
> relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0
> Recipient rejected: te...@spamtrap.realconnect.com)
> command: QUITB  B  args: (null)
> session_destroy: killing client: 0x437a8000
> smtp_new: incoming client on listener: 0x4bd55800
> lookup_ptr 66.63.44.67
> lookup_ptr success
> session_pickup: greeting client
> command: EHLOB  B  args: host-2.ouellet.us
> command: MAIL FROMB  B  B  B  B  args:  SIZE=401
> session_rfc5321_mail_handler: sending notification to mfa
> smtp: got imsg_mfa_mail/rcpt
> smtp: imsg_queue_create_message returned
> command: RCPT TOB  B  B  B  B  B  B  args: 
> smtp: got imsg_mfa_mail/rcpt
> 1273835468.DrzO68BYcwUW9CEQ: from=,
> relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0
> Recipient rejected: te...@opensipd.com)
> command: QUITB  B  args: (null)
> session_destroy: killing client: 0x4df54000
> smtp_new: incoming client on listener: 0x4bd55800
> lookup_ptr 66.63.44.67
> lookup_ptr success
> session_pickup: greeting client
> command: EHLOB  B  args: host-2.ouellet.us
> command: MAIL FROMB  B  B  B  B  args:  SIZE=401
> session_rfc5321_mail_handler: sending notification to mfa
> smtp: got imsg_mfa_mail/rcpt
> smtp: imsg_queue_create_message returned
> command: RCPT TOB  B  B  B  B  B  B  args: 
> smtp: got imsg_mfa_mail/rcpt
> 1273835475.vpDWCOIUN0gNz1gP: from=,
> relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0
> Recipient rejected: te...@opensipd.com)
> command: QUITB  B  args: (null)
> session_destroy: killing client: 0x4df54000
> smtp_new: incoming client on listener: 0x4bd55800
> lookup_ptr 66.63.44.67
> lookup_ptr success
> session_pickup: greeting client

Re: Virtual domains/users setup with smtpd.

2010-05-14 Thread Daniel Ouellet

On 5/14/10 7:16 AM, Daniel Ouellet wrote:

 ^^^--- unless you mention "from all", it will only accept from lo0


accept for domain "opensipd.com" deliver to mbox

^^^--- same here


accept for all relay

^^^--- but don't do it here

Also, just on case you wonder if it is working locally on the server 
itself. It doesn't:


# mail t...@spamtrap.realconnect.com
Subject: Test
.
EOT
Null message body; hope that's ok
# send-mail: 530 5.0.0 Recipient rejected: t...@spamtrap.realconnect.com

# mail te...@spamtrap.realconnect.com
Subject: Test
.
EOT
Null message body; hope that's ok
# send-mail: 530 5.0.0 Recipient rejected: te...@spamtrap.realconnect.com

# mail te...@opensipd.com
Subject: test
.
EOT
Null message body; hope that's ok
# send-mail: 530 5.0.0 Recipient rejected: te...@opensipd.com

# mail te...@opensipd.com
Subject: test
.
EOT
Null message body; hope that's ok
# send-mail: 530 5.0.0 Recipient rejected: te...@opensipd.com



Re: Virtual domains/users setup with smtpd.

2010-05-14 Thread Daniel Ouellet

 ^^^--- unless you mention "from all", it will only accept from lo0


accept for domain "opensipd.com" deliver to mbox

 ^^^--- same here


accept for all relay

 ^^^--- but don't do it here



I had tried that before and no go.

The only one that works is to root at the local hostname, or real users, 
no aliases what so ever being virtual or local one.


Like r...@spamtrap.realconnect.com or r...@opensipd.com will do be in 
the local root mail account and that's the last two you can see in the 
log below showing it as well.


Here are all the details:

# hostname
spamtrap.realconnect.com
# cat /etc/mail/aliases | grep test
test: dan...@presscom.net
test2: root
# newaliases
/etc/mail/aliases: 56 aliases
# cat /etc/mail/smtpd.conf
listen on "lo0"
listen on "dc0"

map "aliases" { source db "/etc/mail/aliases.db" }
map "virtual" { source db "/etc/mail/virtual.db" }


accept from all for local deliver to mbox
accept from all for virtual "virtual" deliver to mbox
accept from all for domain "opensipd.com" deliver to mbox
accept for all relay
# cat virtual
te...@opensipd.com: dan...@presscom.net
te...@opensipd.com: root
# /usr/libexec/smtpd/makemap -t aliases -o /etc/mail/virtual.db 
/etc/mail/virtual

# pkill smtpd
# smtpd -dv
startup [debug mode]
parent_send_config: configuring smtp
parent_send_config_client_certs: configuring smtp
parent_send_config_ruleset: reloading rules and maps
smtp_setup_events: listen on IPv6:fe80:1::203:baff:fe10:6165 port 25 
flags 0x0 cert "dc0"

smtp_setup_events: listen on 66.63.0.75 port 25 flags 0x0 cert "dc0"
smtp_setup_events: listen on IPv6:fe80:4::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on IPv6:::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on 127.0.0.1 port 25 flags 0x0 cert "lo0"
smtp: will accept at most 245 clients
smtp_new: incoming client on listener: 0x4bd55800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=412
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_mfa_mail/rcpt
1273835446.EG3NGPKJR7lFn6wJ: from=, 
relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0 
Recipient rejected: t...@spamtrap.realconnect.com)

command: QUIT   args: (null)
session_destroy: killing client: 0x437a8000
smtp_new: incoming client on listener: 0x4bd55800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=413
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_mfa_mail/rcpt
1273835453.XUkSzWxzYz9J9W5C: from=, 
relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0 
Recipient rejected: te...@spamtrap.realconnect.com)

command: QUIT   args: (null)
session_destroy: killing client: 0x437a8000
smtp_new: incoming client on listener: 0x4bd55800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=401
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_mfa_mail/rcpt
1273835468.DrzO68BYcwUW9CEQ: from=, 
relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0 
Recipient rejected: te...@opensipd.com)

command: QUIT   args: (null)
session_destroy: killing client: 0x4df54000
smtp_new: incoming client on listener: 0x4bd55800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=401
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_mfa_mail/rcpt
1273835475.vpDWCOIUN0gNz1gP: from=, 
relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0 
Recipient rejected: te...@opensipd.com)

command: QUIT   args: (null)
session_destroy: killing client: 0x4df54000
smtp_new: incoming client on listener: 0x4bd55800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=400
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_queue_commit_envelopes
command: DATA   args: (null)
smtp: imsg_queue_message_file returned
smtp: got imsg_queue_commit_message
1273835485.WXjxJQdkjTGCjtMI: from=, size=604, 
nrcpts=1, proto=ESMTP, relay=host-2.ouellet.us [66.63.44.67]

command: QUIT   args: (null)
session_destroy: killing client: 0x437a8000
forkmda: to /us

Re: Virtual domains/users setup with smtpd.

2010-05-14 Thread Gilles Chehade
On Thu, May 13, 2010 at 10:30:59PM -0400, Daniel Ouellet wrote:
> On 5/12/10 4:21 PM, Gilles Chehade wrote:
> >I have very sporadic access to internet this week, your mail is
> >very hard to read, can you summarize as much as possible and
> >describe your exact issue with output from smtpd -dv, smtpd.conf
> >and making sure you are running the latest smtpd ?
> >
> >Will check back my mails tomorrow evening
> 
> Hi Gilles,
> 
> Sorry for the long delay here. Just to mouch things in the works.
> 

[...]

> ===
> in /etc/smtpd.conf
> ===
> listen on "lo0"
> listen on "dc0"
> 
> map "aliases" { source db "/etc/mail/aliases.db" }
> map "virtual" { source db "/etc/mail/virtual.db" }
> 
> accept from all for local deliver to mbox
> accept for virtual "virtual" deliver to mbox
^^^--- unless you mention "from all", it will only accept from lo0

> accept for domain "opensipd.com" deliver to mbox
^^^--- same here

> accept for all relay
^^^--- but don't do it here

-- 
Gilles Chehade
freelance developer/sysadmin/consultant

   http://www.poolp.org



Re: Virtual domains/users setup with smtpd.

2010-05-13 Thread Daniel Ouellet

On 5/12/10 4:21 PM, Gilles Chehade wrote:

I have very sporadic access to internet this week, your mail is
very hard to read, can you summarize as much as possible and
describe your exact issue with output from smtpd -dv, smtpd.conf
and making sure you are running the latest smtpd ?

Will check back my mails tomorrow evening


Hi Gilles,

Sorry for the long delay here. Just to mouch things in the works.

In Short what I try to do, spearing you all the details is to simply 
setup a virtual domain with a single user as a test.


For the example, I have a server setup and add one domain to it and try 
to have one user send emails to the server and getting it to a remote 
address. Something like:


dan...@opensipd.com to be relay to dan...@presscom.net

Nothing more for now.

Also, the setup is used with the latest snapshot to start with, but as 
it doesn't have all your two latest patch as well in the sparc64 yet, I 
did the CVS updates too and compile the absolute latest smtpd. I had 
already got the source as well.


# dmesg | grep '(GENERIC)'
OpenBSD 4.7-current (GENERIC) #315: Tue Apr 27 03:15:34 MDT 2010

# cd /usr
# cvs -qd anon...@anoncvs.ca.openbsd.org:/cvs get -P src/usr.sbin/smtpd
# cd src/usr.sbin/smtpd
# make clean
===> makemap
 Lots of output.

# make
===> makemap
 Lots of output.

# pkill smtpd

# make install
===> makemap
 Lots of output.

# smtpd

Now running the latest one.


Reading some of your previous answers on misc@, this configuration below 
have to do it. A side note, I also tried again tonight these two possibility


accept for domain "opensipd.com" deliver to mbox

replace with

accept for domain "opensipd.com" alias "virtual" deliver to mbox

just in case.

Still no go.

And I tried without the as well with both variation above:

accept from all for local deliver to mbox

Just in case it possibly could cause a problem as well, but no go either.

===
in /etc/smtpd.conf
===
listen on "lo0"
listen on "dc0"

map "aliases" { source db "/etc/mail/aliases.db" }
map "virtual" { source db "/etc/mail/virtual.db" }

accept from all for local deliver to mbox
accept for virtual "virtual" deliver to mbox
accept for domain "opensipd.com" deliver to mbox
accept for all relay



# cat virtual
dan...@opensipd.com: dan...@presscom.net



Create the db with. Full path just to be sure it use your version of 
makemap.


/usr/libexec/smtpd/makemap -t aliases -o /etc/mail/virtual.db 
/etc/mail/virtual




Still get the error:

530 5.0.0 Recipient rejected: dan...@opensipd.com

Full debug below as well and even disable pf to be 100%:

# smtpd -dv
startup [debug mode]
parent_send_config: configuring smtp
parent_send_config_client_certs: configuring smtp
parent_send_config_ruleset: reloading rules and maps
smtp_setup_events: listen on IPv6:fe80:1::203:baff:fe10:6165 port 25 
flags 0x0 cert "dc0"

smtp_setup_events: listen on 66.63.0.75 port 25 flags 0x0 cert "dc0"
smtp_setup_events: listen on IPv6:fe80:4::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on IPv6:::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on 127.0.0.1 port 25 flags 0x0 cert "lo0"
smtp: will accept at most 245 clients
smtp_new: incoming client on listener: 0x4beb6800
lookup_ptr 66.63.44.67
lookup_ptr success
session_pickup: greeting client
command: EHLO   args: host-2.ouellet.us
command: MAIL FROM  args:  SIZE=402
session_rfc5321_mail_handler: sending notification to mfa
smtp: got imsg_mfa_mail/rcpt
smtp: imsg_queue_create_message returned
command: RCPT TOargs: 
smtp: got imsg_mfa_mail/rcpt
1273802922.ANMDYzJ7fPexgiyX: from=, 
relay=host-2.ouellet.us [66.63.44.67], stat=LocalError (530 5.0.0 
Recipient rejected: dan...@opensipd.com)

command: QUIT   args: (null)
session_destroy: killing client: 0x477fc000
^Csmtp server exiting
runner handler exiting
queue handler exiting
mail transfer agent exiting
mail filter exiting
mail delivery agent exiting
lookup agent exiting
control process exiting
parent terminating
#


*
I also try to create a user in the /etc/aliases file to see if that 
works. It do not either. Only works for real users, not aliases to local 
user.


the local server is spamtrp.realconnect.com, so email to

r...@spamtrap.realconnect.com

will be deliver to root local account.

In aliases I also created these two tests account to see:

# cat aliases | grep test
test: dan...@presscom.net
test2: root

and run newaliases obviously.

Still no go and debug show it as well:

# smtpd -dv
startup [debug mode]
parent_send_config: configuring smtp
parent_send_config_client_certs: configuring smtp
parent_send_config_ruleset: reloading rules and maps
smtp_setup_events: listen on IPv6:fe80:1::203:baff:fe10:6165 port 25 
flags 0x0 cert "dc0"

smtp_setup_events: listen on 66.63.0.75 port 25 flags 0x0 cert "d

Re: Virtual domains/users setup with smtpd.

2010-05-12 Thread Gilles Chehade
I have very sporadic access to internet this week, your mail is
very hard to read, can you summarize as much as possible and
describe your exact issue with output from smtpd -dv, smtpd.conf
and making sure you are running the latest smtpd ?

Will check back my mails tomorrow evening

Gilles

On Tue, May 11, 2010 at 10:19:19PM -0400, Daniel Ouellet wrote:
> Hi,
> 
> I am very much hoping that I could get the input of a kind sole out 
> there, or even to send me a working configuration is find. But I spend 
> the last three days on/off to try to get the virtual alias/domains 
> working on smtpd and I can't get there.
> 
> I read the man page no less the 20 times, google and all. Eve saw the 
> changes in alias done a few days, ago. 13 now.
> 
> Even the latest fix here:
> 
> http://www.mail-archive.com/misc@openbsd.org/msg90204.html
> 
> Or the few example here:
> 
> https://calomel.org/opensmtpd.html
> 
> I try on 4.5, 4.7 and after the fix posted 13 days ago, I did try on 
> current as well.
> 
> I even empty a bottle of wine tonight to calm me down as I hit the wall 
> a few times and I am getting upset. May be I don't understand the 
> english as it should be, but for me, there is something missing in the 
> man page that I can't break yet.
> 
> I try no less then may be 100 variation on possible, and very unlikely 
> possibility to get this working, but I cant get there.
> 
> I set up two servers to test, one with 4.5 one with current and even 
> test on 4.6 a few times.
> 
> I strip to the minimum, but frankly, I hit the wall. It got to be the 
> most stupid missing details, but please any help would be great. I can't 
> figure it out with the docs I read so far and believe me I read a hell 
> of a lots so far.
> 
> Below is what I understand, I guess at this time that should work as 
> writing all that I tried would be way to long.
> 
> What am I missing?
> 
> Here are the details:
> 
> Now tested on current on sparc 64.
> 
> I have multiple domains for testing and ll.
> 
> All DNS are ok.
> 
> I see the incoming right.
> 
> I get constant errors at the receiving end:
> 
> May 11 21:07:45 spamtrap smtpd[24488]: 1273626465.PixuMJ6IS1qoctUk: 
> from=, relay=smtp1.realconnect.com [66.63.3.242], 
> stat=LocalError (530 5.0.0 Recipient rejected: dan...@opensipd.com)
> 
> I can deliver local mail to local user on that box.
> 
> I try to setup virtual users on that box, or virtual users forwarded to 
> remote address as well for testing.
> 
> That I can't get there.
> 
> Putting anything in /etc/mail/aliases and doing the newalias will not do it.
> 
> The simplest configuration as I understand it based on the man page and 
> I even removed any tls stuff as well to keep it simple should be:
> 
> mail to root@ the hostname will work, no problem.
> 
> I create the virtual.db file with a single line as follow:
> 
> # cat virtual
> dan...@opensipd.com: dan...@presscom.net
> 
> makemap -t aliases -o /etc/mail/virtual.db /etc/mail/virtual
> 
> the smtpd.conf have this:
> 
> listen on "lo0"
> listen on "dc0"
> 
> map aliases { source db "/etc/mail/aliases.db" }
> map "virtual" { source db "/etc/mail/virtual.db" }
> 
> accept for all relay
> accept from all for local deliver to mbox
> accept for domain "opensipd.com" alias "virtual" deliver to mbox
> 
> But the above isn't right and give configuration errors.
> 
> Even if the man page suggest it should be possible;
> 
> for domain domain [alias map]
>   This rule applies to mail destined for the specified
>   domain.  This parameter supports the `*' wildcard, so
>   that a single rule for all sub-domains can be used, for
>   example:
> 
>   accept for domain "*.example.com" deliver to mbox
> 
>   If specified, map is used for looking up alternative
>   destinations for addresses in this domain.
> 
> 
> May be I don't understand that part properly.
> 
> Anyway, putting:
> 
> accept from all for domain "opensipd.com" alias "virtual" deliver to mbox
> 
> give errors as well.
> 
> accept from all for virtual "virtual" deliver to mbox
> 
> give no success either.
> 
> even f there isn't any error at the start.
> 
> I still get the :
> 
> 530 5.0.0 Recipient rejected: dan...@opensipd.com
> 
> Even trying this for a test;
> 
> accept from all for virtual "virtual" relay
> 
> will not go.
> 
> Or this;
> 
> accept from all for domain "virtual" deliver to mbox
> 
> no error at startup, but still no go.
> 
> Anyway, I got a very long list of variation and all kind of trial and 
> nothing works for me so far.
> 
> Please anyone can tell me what actually works in a step by step as long 
> like what ever I read just do not give me the answer and I am at a lost 
> to get it going.
> 
> It got to very very stupid and I am sure I will beat myself over the 
> head when it's working, but I can't get it, or understand the man page 
> properly.
> 
> Some small details is definitely missing for me to get it and may be a 
> very smal

Virtual domains/users setup with smtpd.

2010-05-11 Thread Daniel Ouellet

Hi,

I am very much hoping that I could get the input of a kind sole out 
there, or even to send me a working configuration is find. But I spend 
the last three days on/off to try to get the virtual alias/domains 
working on smtpd and I can't get there.


I read the man page no less the 20 times, google and all. Eve saw the 
changes in alias done a few days, ago. 13 now.


Even the latest fix here:

http://www.mail-archive.com/misc@openbsd.org/msg90204.html

Or the few example here:

https://calomel.org/opensmtpd.html

I try on 4.5, 4.7 and after the fix posted 13 days ago, I did try on 
current as well.


I even empty a bottle of wine tonight to calm me down as I hit the wall 
a few times and I am getting upset. May be I don't understand the 
english as it should be, but for me, there is something missing in the 
man page that I can't break yet.


I try no less then may be 100 variation on possible, and very unlikely 
possibility to get this working, but I cant get there.


I set up two servers to test, one with 4.5 one with current and even 
test on 4.6 a few times.


I strip to the minimum, but frankly, I hit the wall. It got to be the 
most stupid missing details, but please any help would be great. I can't 
figure it out with the docs I read so far and believe me I read a hell 
of a lots so far.


Below is what I understand, I guess at this time that should work as 
writing all that I tried would be way to long.


What am I missing?

Here are the details:

Now tested on current on sparc 64.

I have multiple domains for testing and ll.

All DNS are ok.

I see the incoming right.

I get constant errors at the receiving end:

May 11 21:07:45 spamtrap smtpd[24488]: 1273626465.PixuMJ6IS1qoctUk: 
from=, relay=smtp1.realconnect.com [66.63.3.242], 
stat=LocalError (530 5.0.0 Recipient rejected: dan...@opensipd.com)


I can deliver local mail to local user on that box.

I try to setup virtual users on that box, or virtual users forwarded to 
remote address as well for testing.


That I can't get there.

Putting anything in /etc/mail/aliases and doing the newalias will not do it.

The simplest configuration as I understand it based on the man page and 
I even removed any tls stuff as well to keep it simple should be:


mail to root@ the hostname will work, no problem.

I create the virtual.db file with a single line as follow:

# cat virtual
dan...@opensipd.com: dan...@presscom.net

makemap -t aliases -o /etc/mail/virtual.db /etc/mail/virtual

the smtpd.conf have this:

listen on "lo0"
listen on "dc0"

map aliases { source db "/etc/mail/aliases.db" }
map "virtual" { source db "/etc/mail/virtual.db" }

accept for all relay
accept from all for local deliver to mbox
accept for domain "opensipd.com" alias "virtual" deliver to mbox

But the above isn't right and give configuration errors.

Even if the man page suggest it should be possible;

for domain domain [alias map]
  This rule applies to mail destined for the specified
  domain.  This parameter supports the `*' wildcard, so
  that a single rule for all sub-domains can be used, for
  example:

  accept for domain "*.example.com" deliver to mbox

  If specified, map is used for looking up alternative
  destinations for addresses in this domain.


May be I don't understand that part properly.

Anyway, putting:

accept from all for domain "opensipd.com" alias "virtual" deliver to mbox

give errors as well.

accept from all for virtual "virtual" deliver to mbox

give no success either.

even f there isn't any error at the start.

I still get the :

530 5.0.0 Recipient rejected: dan...@opensipd.com

Even trying this for a test;

accept from all for virtual "virtual" relay

will not go.

Or this;

accept from all for domain "virtual" deliver to mbox

no error at startup, but still no go.

Anyway, I got a very long list of variation and all kind of trial and 
nothing works for me so far.


Please anyone can tell me what actually works in a step by step as long 
like what ever I read just do not give me the answer and I am at a lost 
to get it going.


It got to very very stupid and I am sure I will beat myself over the 
head when it's working, but I can't get it, or understand the man page 
properly.


Some small details is definitely missing for me to get it and may be a 
very small additional example in the man page might help lost sole like me.


Anyone have a small amount of time to graciously offer me to light my 
candle here?


Best,

Daniel

PS; I didn't put all the variation I tried in the last three days as 
many were just plan stupid, but I tried anyway just in case. I just 
can't get there.