You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Brett Sutton <bs...@idatam.com.au> on 2005/07/06 11:52:57 UTC
odd redirect - relaying denied interaction
I have a requirment to forward all mail sent from a specific address to
be redirected to a single user, regardless of the intended recipient.
This is to aid in debugging programs which use a copy of a production
database and which send out lots of mail to addresses in the database.
During debugging we don't want the real reciepents to recieve mail from
our test system but we also don't want to have to update the email
addresses in the database.
So the proposes solution is to use james and add a Redirect mailet which
sends all mail from certain addresses to a single user (the programmer).
Unfortunatley easier said than done.
I first set up the james mail server and sent a test message through the
system, no problems.
The Relay statement is as follows
* <mailet
match="RemoteAddrNotInNetwork=127.0.0.1,*.mydomain.com.au,10.*.*.*"
class="ToProcessor">
<processor> relay-denied </processor>
<notice>550 - Requested action not taken: relaying
denied</notice>
</mailet>
*And servernames is as follows
<servernames autodetect="true" autodetectIP="true">
<!-- CONFIRM? -->
<servername>localhost</servername>
<servername>*.mydomain.com.au</servername>
</servernames>
I then added the following mailet to the config file:
<mailet match="SenderIs=myaddress@mydomain.com.au" class="Redirect">
<sender>debug@mydomain.com.au</sender>
<to>info@mydomain.com.au</to>
<message>Bounced from James</message>
<inline>unaltered</inline>
<attachment>message</attachment>
<passThrough>FALSE</passThrough>
<prefix xml:space="preserve">[Bounced: ] </prefix>
<static>TRUE</static>
</mailet>
And sent an identical message.
At this point the message was being dumped into the relay-denied mail
directory.
If I remove the RemoteAddressNotInNetwork block or the Redirect Mailet
all works fine but not the two together.
Can anyone please help?
Thanks in advance,
Brett
Re: odd redirect - relaying denied interaction
Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
It should work; the only things I suspect can create a problem (but I'm
not sure) are:
1) Not sure if wildchars are acceptable in
<servername>*.mydomain.com.au</servername>: try with mydomain.com.au.
2) Almost sure that wildchars are not acceptable in
RemoteAddrNotInNetwork=*.mydomain.com.au, being not an IP but a dns
name: try with mydomain.com.au.
Try it; hope it works.
Vincenzo
Brett Sutton wrote:
> I have a requirment to forward all mail sent from a specific address
> to be redirected to a single user, regardless of the intended
> recipient. This is to aid in debugging programs which use a copy of a
> production database and which send out lots of mail to addresses in
> the database.
> During debugging we don't want the real reciepents to recieve mail
> from our test system but we also don't want to have to update the
> email addresses in the database.
>
> So the proposes solution is to use james and add a Redirect mailet
> which sends all mail from certain addresses to a single user (the
> programmer).
>
> Unfortunatley easier said than done.
>
> I first set up the james mail server and sent a test message through
> the system, no problems.
>
> The Relay statement is as follows
>
> * <mailet
> match="RemoteAddrNotInNetwork=127.0.0.1,*.mydomain.com.au,10.*.*.*"
> class="ToProcessor">
> <processor> relay-denied </processor>
> <notice>550 - Requested action not taken: relaying
> denied</notice>
> </mailet>
>
> *And servernames is as follows
> <servernames autodetect="true" autodetectIP="true">
> <!-- CONFIRM? -->
> <servername>localhost</servername>
> <servername>*.mydomain.com.au</servername>
> </servernames>
>
>
> I then added the following mailet to the config file:
>
> <mailet match="SenderIs=myaddress@mydomain.com.au" class="Redirect">
> <sender>debug@mydomain.com.au</sender>
> <to>info@mydomain.com.au</to>
> <message>Bounced from James</message>
> <inline>unaltered</inline>
> <attachment>message</attachment>
> <passThrough>FALSE</passThrough>
> <prefix xml:space="preserve">[Bounced: ] </prefix>
> <static>TRUE</static>
> </mailet>
>
>
>
> And sent an identical message.
> At this point the message was being dumped into the relay-denied mail
> directory.
> If I remove the RemoteAddressNotInNetwork block or the Redirect Mailet
> all works fine but not the two together.
>
> Can anyone please help?
>
> Thanks in advance,
> Brett
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
allowing valid users to get mail even if mail contains invalid recipients
Posted by Davide Dalla Rosa <d....@pollisrl.it>.
Hi all. I'm struck with the following problem:
Some mail messages are sent to several recipients in my domain:
user1@mydomain.com, user2@mydomain.com, user3@mydomain.com... and so on.
One address is wrong (e.g. user3 does not exist)
When james retrieves this mail from the server, it looks at the addresses,
and if james found some undefined addresses, no mail is sent to valid users.
How am I supposed to change config files in order to let valid users to get
mail even if there are some invalid recipients?
Thanks davide
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org