Re: Relaying e-mail from the bash command line (with sendmail probably)

2012-06-16 Thread Wiebe Cazemier
- Original Message -
> From: "Wietse Venema" 
> To: "Wiebe Cazemier" 
> Cc: "Postfix users" 
> Sent: Sunday, 17 June, 2012 2:41:29 AM
> Subject: Re: Relaying e-mail from the bash command line (with sendmail 
> probably)
> 
> Wiebe Cazemier:
> > > Transport maps can be per-recipient.
> > 
> > But when I want to relay to another server, I don't want to send
> > it to one recipient. I want to send it to whatever recipient the
> > original message was sent to, but to another server.
> 
> transport_maps changes the relay HOST, but NOT the RECIPIENT.
> 
>   Wietse
> 

But, my problem is this:

- host a.com receives mail for j...@a.com.
- after being queued, it goes through content_filter.
- content filter script needs to send to another host, and therefore I define a 
transport map: "@a.com smtp:[b.com]" and I just use "sendmail -G -i -f sender 
-- recipient < message".
- mail cannot be delivered locally anymore, because the message fed back into 
postfix that should be delivered locally, is also match by the transport map 
and will be sent to b.com as well.

Am I missing something here?



Re: Emails from IPv6 addresses are blocked by DNSBLs

2012-06-16 Thread Benny Pedersen

Den 2012-06-16 22:53, Thomas Preissler skrev:


Did anybody experience the same?
The odd thing is, and I cannot get my head around that, is that it 
works

for some, for others it never worked.


and this all changed in the change from ipv4 to ipv6 ?, so better drop 
ipv6 problem :=)


well for me ipv6 is not a problem since i dont have it, well i had, but 
dropped it since i wanted to use avail ram for more clamav signatures


# cat banks.pdb
H:visa.dk
H:nordea.dk
H:nets.eu

do anyoneone seen one of nordea that was sent from an spf pass domain ?

i lke to make the banks.pdb global non official if time permits me to 
learn it before i die






Re: Emails from IPv6 addresses are blocked by DNSBLs

2012-06-16 Thread Alvin Wong
Hi,

What if you put bl.spamcop.net below other blocklsts?

P.S. zen.spamhaus.org includes xbl.spamhaus.org, which includes
cbl.abuseat.org, so you don't actually need cbl.abuseat.org as another
entry.

2012/6/17 Wietse Venema :
> Thomas Preissler:
>> Hello,
>>
>> I have now for some time Postfix listening on IPv6 on my server.
>> When I send for example emails to boun...@freenet6.net or
>> i...@test-ipv6.veznat.com I receive them via IPv6, all is good.
>> I also (very rarely though) receive "normal" emails via IPv6. So far so
>> good.
>>
>> Basically when more and more email servers got IPv6 enabled, I sometimes
>> saw
>>
>> Jun 14 19:20:02 dumbledor postfix/smtpd[1472]: NOQUEUE: reject: RCPT
>> from unknown[2002::XXX:::XXX]: 554 5.7.1 Service unavailable;
>> Client host [2002::XXX::4d49:4f1] blocked using bl.spamcop.net;
>> from= to=
>> proto=ESMTP helo=
>>
>> Long story short:
>> * Some IPv6 addreses are DNSBL blocked, some or not. When they are
>>   blocked, they stay blocked and same for when they are not blocked
>>   (like the test IPv6 emailaddresses above).
>> * They always get blocked by the first DNSBL entry - obviously.
>> * Querying the DNSBL via their webinterface doesnt work for IPv6
>>   addresses, doing the same via the equivalent nslookup or dig command
>>   gives me NXDOMAIN.
>> * No IPv6 firewall enabled, but I run a local only bind.
>>
>> Did anybody experience the same?
>> The odd thing is, and I cannot get my head around that, is that it works
>> for some, for others it never worked.
>
> What is the IP address?
>
> What NSLOOKUP query did you use?
>
>        Wietse


Re: Relaying e-mail from the bash command line (with sendmail probably)

2012-06-16 Thread Wietse Venema
Wiebe Cazemier:
> > Transport maps can be per-recipient.
> 
> But when I want to relay to another server, I don't want to send
> it to one recipient. I want to send it to whatever recipient the
> original message was sent to, but to another server.

transport_maps changes the relay HOST, but NOT the RECIPIENT.

Wietse


Re: Emails from IPv6 addresses are blocked by DNSBLs

2012-06-16 Thread Wietse Venema
Thomas Preissler:
> Hello,
> 
> I have now for some time Postfix listening on IPv6 on my server. 
> When I send for example emails to boun...@freenet6.net or
> i...@test-ipv6.veznat.com I receive them via IPv6, all is good.
> I also (very rarely though) receive "normal" emails via IPv6. So far so
> good.
> 
> Basically when more and more email servers got IPv6 enabled, I sometimes
> saw
> 
> Jun 14 19:20:02 dumbledor postfix/smtpd[1472]: NOQUEUE: reject: RCPT
> from unknown[2002::XXX:::XXX]: 554 5.7.1 Service unavailable;
> Client host [2002::XXX::4d49:4f1] blocked using bl.spamcop.net;
> from= to=
> proto=ESMTP helo=
> 
> Long story short:
> * Some IPv6 addreses are DNSBL blocked, some or not. When they are
>   blocked, they stay blocked and same for when they are not blocked
>   (like the test IPv6 emailaddresses above).
> * They always get blocked by the first DNSBL entry - obviously.
> * Querying the DNSBL via their webinterface doesnt work for IPv6
>   addresses, doing the same via the equivalent nslookup or dig command
>   gives me NXDOMAIN.
> * No IPv6 firewall enabled, but I run a local only bind.
> 
> Did anybody experience the same? 
> The odd thing is, and I cannot get my head around that, is that it works
> for some, for others it never worked.

What is the IP address?

What NSLOOKUP query did you use?

Wietse


tentative to wrote a minimal smtp server

2012-06-16 Thread ml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hello honorable doctor master of C Fu hello doctor Wietse


i am continu my tentative to wrote a minimal mail server
that would work as open relay

my work is this
https://gitorious.org/openrelay/openrelay/trees/

work well on centos 6 and 5
to be more precise he listen well the network and stores the mails in a
file but I can not send messages over the network.
Can you help me

sincerely
- -- 
  http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
  gpg --keyserver pgp.mit.edu --recv-key C2626742

  http://urlshort.eu fakessh @
  http://gplus.to/sshfake
  http://gplus.to/sshswilting
  http://gplus.to/john.swilting
  https://lists.fakessh.eu/mailman/
  This list is moderated by me, but all applications will be accepted
  provided they receive a note of presentation
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/dERYACgkQNgqL0sJiZ0JIuwCcCPLuKnbKYnoW8AbOeuPb4QIW
oscAn26y76GLafwfgEKT3zuFTUCUC/3W
=Hcqq
-END PGP SIGNATURE-


Emails from IPv6 addresses are blocked by DNSBLs

2012-06-16 Thread Thomas Preissler
Hello,

I have now for some time Postfix listening on IPv6 on my server. 
When I send for example emails to boun...@freenet6.net or
i...@test-ipv6.veznat.com I receive them via IPv6, all is good.
I also (very rarely though) receive "normal" emails via IPv6. So far so
good.

Basically when more and more email servers got IPv6 enabled, I sometimes
saw

Jun 14 19:20:02 dumbledor postfix/smtpd[1472]: NOQUEUE: reject: RCPT
from unknown[2002::XXX:::XXX]: 554 5.7.1 Service unavailable;
Client host [2002::XXX::4d49:4f1] blocked using bl.spamcop.net;
from= to=
proto=ESMTP helo=

Long story short:
* Some IPv6 addreses are DNSBL blocked, some or not. When they are
  blocked, they stay blocked and same for when they are not blocked
  (like the test IPv6 emailaddresses above).
* They always get blocked by the first DNSBL entry - obviously.
* Querying the DNSBL via their webinterface doesnt work for IPv6
  addresses, doing the same via the equivalent nslookup or dig command
  gives me NXDOMAIN.
* No IPv6 firewall enabled, but I run a local only bind.

Did anybody experience the same? 
The odd thing is, and I cannot get my head around that, is that it works
for some, for others it never worked.


Cheers

Thomas


=> 2.7.1-1+squeeze1
=> main.cf
inet_interfaces = 127.0.0.1, 94.229.77.82, ::1,
2a01:348:226:dead:beef:dead:beef:dead, 2a01:348:226::21
inet_protocols = ipv4, ipv6
[..]
smtpd_client_restrictions =
  check_client_access hash:/etc/postfix/blackwhite.map,
  check_client_access pcre:/etc/postfix/blackwhite.regex,
  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_unknown_sender_domain,
  permit_mynetworks,
  permit_sasl_authenticated,
#  reject_rbl_client list.dsbl.org,
#  reject_rbl_client sbl.spamhaus.org,
#  reject_rbl_client relays.ordb.org,
#  reject_rbl_client bl.spamcop.net,
#  reject_rbl_client dun.dnsrbl.net,

# cn. is blocking opendns emails, as they are using ipv6 nowadays
#  reject_rbl_client cn.countries.nerd.dk,
#   reject_rbl_client vn.countries.nerd.dk,
#   reject_rbl_client kr.countries.nerd.dk,
#   reject_rbl_client ru.countries.nerd.dk,
#   reject_rbl_client tr.countries.nerd.dk,
#   reject_rbl_client au.countries.nerd.dk,
#   reject_rbl_client ix.dnsbl.manitu.net,
  reject_rbl_client bl.spamcop.net,
  reject_rbl_client cbl.abuseat.org,
  reject_rbl_client zen.spamhaus.org,
  permit


-- 
www.preissler.co.uk | Twitter: @module0x90 | PGP-Key: 75889415
GPG Fingerprint:  CCBD 153A D257 CA7E A217  FDF7 5928 03D1 7588 9415


Re: Relaying e-mail from the bash command line (with sendmail probably)

2012-06-16 Thread Wiebe Cazemier
- Original Message -
> From: "Wietse Venema" 
> To: "Postfix users" 
> Sent: Saturday, 16 June, 2012 3:50:40 PM
> Subject: Re: Relaying e-mail from the bash command line (with sendmail 
> probably)
> 
> Transport maps can be per-recipient.

But when I want to relay to another server, I don't want to send it to one 
recipient. I want to send it to whatever recipient the original message was 
sent to, but to another server.

> 
> If that does not answer the question, please describe the problem
> that you are trying to solve (some u...@example.com needs special
> processing before it can be delivered to the example.com server)
> instead of the solution (deliver one specific u...@example.com to
> a different server without creating a mail delivery loop).

It's an implementation detail for another problem I asked some days ago: 
delivering mail locally and relaying to another server. bcc-ing was suggested 
with bcc_maps, but it doesn't work for me, because it doesn't produce a correct 
X-Original-To: and Delivered-To: header. I got stuck trying to use bcc maps, so 
that's why I'm trying to implement a "postfix tee".

See this for what I did: http://serverfault.com/a/399179/31475

I just want Postfix to deliver normally and then use content_filter to pass the 
message to a batch script which relays it to another server.


Re: Relaying e-mail from the bash command line (with sendmail probably)

2012-06-16 Thread Wietse Venema
Wiebe Cazemier:
> Hi, 
> 
> In a bash script, I have: 
> 
> - an e-mail message with full headers in a tmp file.
> - A from address (to use for -f with 'sendmail')
> - a recipient (u...@example.com).
> 
> How do I relay this message to another server than example.com,
> but do set RCPT TO to u...@example.com when relaying to that other
> server?
>
> One option I can think of is using a transport entry in transport
> maps, but because this runs on the server example.com, I can't set
> another transport for example.com.

Transport maps can be per-recipient.

If that does not answer the question, please describe the problem
that you are trying to solve (some u...@example.com needs special
processing before it can be delivered to the example.com server)
instead of the solution (deliver one specific u...@example.com to
a different server without creating a mail delivery loop).

Wietse


Relaying e-mail from the bash command line (with sendmail probably)

2012-06-16 Thread Wiebe Cazemier
Hi, 

In a bash script, I have: 

- an e-mail message with full headers in a tmp file.
- A from address (to use for -f with 'sendmail')
- a recipient (u...@example.com).

How do I relay this message to another server than example.com, but do set RCPT 
TO to u...@example.com when relaying to that other server?

One option I can think of is using a transport entry in transport maps, but 
because this runs on the server example.com, I can't set another transport for 
example.com.

Any advice is welcome.

Regards,

Wiebe