Re: recipient question

2016-03-23 Thread Edgar Pettijohn

I've used it in the past.  The following should work.

table tablename file:/etc/mail/something

accept from any for domain  recipient  deliver to mbox

/etc/mail/something
u...@something.com

On 03/23/16 17:31, Ian Darwin wrote:

At this time, the list is very low volume, feel free to introduce yourself
;-)

Hola! This is Ian Darwin, sometime OpenBSD committer (ports, mostly, but I also 
wrote
the old file(1) command "a while ago"), Java geek, tech instructor/author, and 
photographer.

I've been running smtpd on my OpenBSD laptop for I think a couple of years
and in production on a low-volume server for maybe a year (it's been up for
220 days so maybe 3/4 of a year, I dunno).

I'm asking if anybody has a working example with "recipient"?

What I planned to do was divert one person's (myself, #1 guinea pig) incoming
mail to a different MDA for testing a new MDA. I tried taking this existing 
line:

accept from any for domain  alias  deliver to mbox

and cloning it, the first version to add "recipient { "per...@dom.ain" }"
and the second as above. I tried putting the recipient after the domain, e.g.,

accept from any for domain  recipient  alias  
deliver to mbox

Why after?  Because the man page says "Further filtering may be achieved on
specific recipients if desired" and "further" implies after - the man page
has no example of this (whether you write the table as a table rule or
inline should not matter, but I did try both before sending this post).

Also tried putting it in a variety of other places, replacing some phrases, etc.

I could not come up with anything that didn't give the dreaded :-) "smtpd.conf:24: 
syntax error"

Is this the right tool for this job, and, if so, how does it actually work?

Thanks if anyone can steer me right on this.

Ian




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



recipient question

2016-03-23 Thread Ian Darwin
> At this time, the list is very low volume, feel free to introduce yourself
> ;-)

Hola! This is Ian Darwin, sometime OpenBSD committer (ports, mostly, but I also 
wrote
the old file(1) command "a while ago"), Java geek, tech instructor/author, and 
photographer.

I've been running smtpd on my OpenBSD laptop for I think a couple of years
and in production on a low-volume server for maybe a year (it's been up for
220 days so maybe 3/4 of a year, I dunno).

I'm asking if anybody has a working example with "recipient"?

What I planned to do was divert one person's (myself, #1 guinea pig) incoming
mail to a different MDA for testing a new MDA. I tried taking this existing 
line:

accept from any for domain  alias  deliver to mbox

and cloning it, the first version to add "recipient { "per...@dom.ain" }"
and the second as above. I tried putting the recipient after the domain, e.g.,

accept from any for domain  recipient  alias  
deliver to mbox

Why after?  Because the man page says "Further filtering may be achieved on
specific recipients if desired" and "further" implies after - the man page
has no example of this (whether you write the table as a table rule or
inline should not matter, but I did try both before sending this post).

Also tried putting it in a variety of other places, replacing some phrases, etc.

I could not come up with anything that didn't give the dreaded :-) 
"smtpd.conf:24: syntax error"

Is this the right tool for this job, and, if so, how does it actually work?

Thanks if anyone can steer me right on this.

Ian

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



Re: [Filters] share data between callbacks

2016-03-23 Thread fritjof
On Wed, Mar 23, 2016 at 09:49:24AM +0100, Gilles Chehade wrote:
> On Wed, Mar 23, 2016 at 12:21:03AM +0100, Joerg Jung wrote:
> > On Tue, Mar 22, 2016 at 10:57:00PM +0100, frit...@alokat.org wrote:
> > > Hi,
> > > 
> > > is it possible to share data between callback functions in a python-based 
> > > filter?
> > > I'm looking for something like this one (from the clamav filter):
> > > - filter_api_set_udata
> > > - filter_api_get_udata
> > 
> > I think you could just create your own python dict which associates user
> > data with the given message ID. 
> >  
> 
> yes, that's what I do myself, i use the on_connect/on_disconnect to
> store a per-session dictionnary where i can store stuff I want to
> retain between callbacks
>

Thanks, I'll give it a try.

Btw: why do I not see the filter log calls (e.g. from filter-trace), if I use
$ echo "foo" | mail -s "bar" 
but I can see how the mail is processed.

If I use:
$ telnet localhost 25
and do all the staff manually, I see the filter's output.

--f.

> -- 
> Gilles Chehade
> 
> https://www.poolp.org  @poolpOrg
> 

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



Is the /etc/aliases file an anachronism on modern systems running OpenSMTPD?

2016-03-23 Thread Seth
I've been running several OpenSMPTD servers on OpenBSD for a while now  
without using the /etc/aliases file.


I'm having issues however with annoying email being generated from the  
r...@mx.domain.tld and mailer-dae...@mx.domain.tld addresses which get  
stuck in the delivery queue because I don't have the systems configured to  
accept email at the mx.domain.tld subdomain.


Maybe this is more of a question for the OpenBSD list, but I'm wondering  
if in this day and age, the '/etc/aliases' file is really just a dumb  
clunky sendmail throwback that needs to die in a fire and is unnecessary  
on modern OpenBSD/OpenSMTPD systems.


If it's not necessary, is there anyway that I can force all system email  
generated for the root user to go to a designated email of my choosing,  
without having to use /etc/aliases and add the corresponding table and  
accept lines in smptd.conf? I can edit the cron /etc/daily|weekly|monthly  
scripts but that does not seem to address the smtpd daemon generated error  
messages.


Curious to know how other OpenSMTPD users address 'the aliases' question.

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