Adding a X-Delivered-To header

2008-02-13 Thread ram
Can I configure cyrus deliver command to insert a X-Delivered-To header
for every mail 

I looked up the man page for deliver(8) There is mention of inserting
the envelope sender not the recipient 


Thanks
Ram



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Reject large emails

2008-02-13 Thread Joseph Brennan


--On Wednesday, February 13, 2008 12:27 PM +0200 Nikos Gatsis 
<[EMAIL PROTECTED]> wrote:

> Joseph thank you for your answer.
> We use sendmail. Do you know how to set up sendmail.mc to reject those
> emails?


define(`confMAX_MESSAGE_SIZE',3000)

Read the README for how to put that into sendmail.mc and generate a
sendmail.cf file.  Your choice of size, in bytes.

Joseph Brennan
Lead Email Systems Engineer
Columbia University Information Technology


 

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Rob Mueller
> Okay, so you confirm my impression that message content and envelope seem
> to be treated the same way now (for example with postfix). Then, wouldn't
> it make sense to do the same with Cyrus? Could parseaddr() be relaxed to
> do this?

It sounds like the right approach, but there's probably quite a bit of code 
to check for assumptions...

Rob


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Simon Matter
>>> Can you turn off the 8BITMIME extension that postfix advertises? It
>>> seems
>>> from the RFC (http://tools.ietf.org/html/rfc4952), if 8BITMIME isn't
>>
>> That seems to be the right logic but I can't find the proper way to do
>> it
>> with postfix.
>>
>> Anyway, I'm not sure about the whole 8BITMIME thing and whether it
>> counts
>> for message content or envelope or both?
>> It it counts for both, why does Cyrus lmtp advertise 8BITMIME and then
>> refuses to accept mail with 8bit envelope.
>> I'm really confused and from looking at different list archives I see
>> that
>> I'm not alone.
>
> Agreed.
>
> From what I can see, the original 8BITMIME extension was 8-bit message
> content, but has been updated to include 8-bit SMTP transaction envelopes
> as
> well. It might be a mismatch between that over time (eg postfix changed at
> 2.4.5 as well)

Okay, so you confirm my impression that message content and envelope seem
to be treated the same way now (for example with postfix). Then, wouldn't
it make sense to do the same with Cyrus? Could parseaddr() be relaxed to
do this?

Simon



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Reject large emails

2008-02-13 Thread Sebastian Hagedorn

--On 13. Februar 2008 12:27:11 +0200 Nikos Gatsis <[EMAIL PROTECTED]> wrote:


We use sendmail. Do you know how to set up sendmail.mc to reject those
emails?


define(`confMAX_MESSAGE_SIZE', `5000')dnl
--
.:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.
  .:.:.:.Skype: shagedorn.:.:.:.

pgpwuO9LJicin.pgp
Description: PGP signature

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Simon Matter
>
>> Yes, but that will block possibly valid mail. Of course I don't accept
>> mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it,
>> but
>> I should accept non-ASCII MAIL FROM addresses if they are valid. But
>> Cyrus
>> also refuses them. That's the real problem.
>
> Can you turn off the 8BITMIME extension that postfix advertises? It seems
> from the RFC (http://tools.ietf.org/html/rfc4952), if 8BITMIME isn't

That seems to be the right logic but I can't find the proper way to do it
with postfix.

> advertised, then it's up to the sending side to downgrade the SMTP
> transaction to ASCII, and then you could block non-ASCII MAIL FROM
> addresses...

Anyway, I'm not sure about the whole 8BITMIME thing and whether it counts
for message content or envelope or both?
It it counts for both, why does Cyrus lmtp advertise 8BITMIME and then
refuses to accept mail with 8bit envelope.
I'm really confused and from looking at different list archives I see that
I'm not alone.

Simon



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Rob Mueller
>> Can you turn off the 8BITMIME extension that postfix advertises? It seems
>> from the RFC (http://tools.ietf.org/html/rfc4952), if 8BITMIME isn't
>
> That seems to be the right logic but I can't find the proper way to do it
> with postfix.
>
> Anyway, I'm not sure about the whole 8BITMIME thing and whether it counts
> for message content or envelope or both?
> It it counts for both, why does Cyrus lmtp advertise 8BITMIME and then
> refuses to accept mail with 8bit envelope.
> I'm really confused and from looking at different list archives I see that
> I'm not alone.

Agreed.

>From what I can see, the original 8BITMIME extension was 8-bit message 
content, but has been updated to include 8-bit SMTP transaction envelopes as 
well. It might be a mismatch between that over time (eg postfix changed at 
2.4.5 as well)

Rob


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Reject large emails

2008-02-13 Thread Konrad Mauz
On Wed, Feb 13, 2008 at 12:27:11PM +0200, Nikos Gatsis wrote:
> Joseph thank you for your answer.
> We use sendmail. Do you know how to set up sendmail.mc to reject those 
> emails?
> Thank you

Hi Nikos,

ind sendmail.mc you can use

define(`confMAX_MESSAGE_SIZE',`10485760')dnl

to set the max message size to 10 MByte.

Regards,

Konrad

-- 
Konrad Mauz 
Rechenzentrum
Hochschule Technik, Wirtschaft und Gestaltung
Braunegger-Strasse 55, D 78462 Konstanz 
e-mail: [EMAIL PROTECTED]
Tel.:   +49 7531 206-472
Fax.:   +49 7531 206-153

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Alexey Lobanov
Hello.

13.02.2008 13:25, Sebastian Hagedorn пишет:

> Isn't that controlled by reject8bit and munge8bit?

No it is not.

"munge8bit" does not affect MAIL FROM data in LMTP session. It affects
RFC-2822 headers only.

"reject8bit" is hardly acceptable anyway if you deal with languages
other than English, Dutch and Italian. Too many real web-scripts and
other dumb programs still don't know MIME-2 and send non-ASCII (i.e.,
French or German) names and subjects as is, in 8 bit.

Alexey

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Simon Matter
> --On 13. Februar 2008 09:50:58 +0100 Simon Matter <[EMAIL PROTECTED]>
> wrote:
>
>>> See http://archives.neohapsis.com/archives/postfix/2008-01/1321.html
>>
>> Yes, but that will block possibly valid mail. Of course I don't accept
>> mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it,
>> but
>> I should accept non-ASCII MAIL FROM addresses if they are valid. But
>> Cyrus
>> also refuses them. That's the real problem.
>
> Isn't that controlled by reject8bit and munge8bit?

Unfortunately no. I have munge8bit enabled which means for example german
umlauts are converted to 'X'. But that doesn't affect envelope MAIL FROM
addresses. cyrus lmtp simply rejects those mails.
That's exactly my question, should cyrus lmtp be more liberal with sender
envelope addresses (it can be strict with RCPT TO of course)?

Simon


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: fosdem

2008-02-13 Thread Matthijs Mohlmann
Rudy Gevaert wrote:
> Rudy Gevaert wrote:
>> Hi,
>>
>> Any anybody who is using cyrus heading to Fosdem (that's in Brussels, 
>> Belgium)?  http://www.fosdem.org
>>
>> If so, maybe we can have an informal meet.
> 
> Hi,
> 
> As some people have replied.  Maybe we can have lunch the Saturday? 
> Between 12 and 14.
> 
> Please reply of list to me if you still interested.
> 
> Rudy

Hi,

That's fine with me, where do we meet and how do we recognize each other 
? I'm wearing a debian sweater, but probably more people do that...

Regards,

Matthijs Mohlmann


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Reject large emails

2008-02-13 Thread Nikos Gatsis

Joseph thank you for your answer.
We use sendmail. Do you know how to set up sendmail.mc to reject those 
emails?

Thank you

Joseph Brennan wrote:
--On Tuesday, February 12, 2008 10:58 +0200 Nikos Gatsis <[EMAIL PROTECTED]> 
wrote:


  

Hello list.
Is it possible with cyrus to reject emails with large attachments and
inform the sender for the rejection?




As stated, normally done at the MTA level.  But note also, normally
done by total message size, not attachment size.  If you have to
analyze mime parts and measure the size of each one, half the battle
is lost already, that is the sender already transmitted the large
message and you had to store it in a spool file and parse it.

At MTA level, if you and the sender both use ESMTP, your MTA can state
its maximum message size in the ehlo response, and the sender's MTA can
see that and not even send the message.  That is the best outcome.  If
the sender does not use ESMTP, it wastes time sending the entire
message, but you can still reject quickly.

The sender's MTA will create the bounce notice, or do whatever else
it does when mail can't be delivered.

The Cyrus system should not send a bounce.  It should only accept or
reject, and the sending MTA should handle notifying the sender.

Joseph Brennan
Columbia University Information Technology



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

  


--

*Γατσής Νίκος - Gatsis Nikos*
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Sebastian Hagedorn
--On 13. Februar 2008 09:50:58 +0100 Simon Matter <[EMAIL PROTECTED]> 
wrote:



See http://archives.neohapsis.com/archives/postfix/2008-01/1321.html


Yes, but that will block possibly valid mail. Of course I don't accept
mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it, but
I should accept non-ASCII MAIL FROM addresses if they are valid. But Cyrus
also refuses them. That's the real problem.


Isn't that controlled by reject8bit and munge8bit?

  munge8bit: 1
   If enabled, lmtpd munges messages with  8-bit  characters  in 
the
   headers.   The 8-bit characters are changed to ‘X’.  If 
reject8bit
   is enabled, setting munge8bit has no effect.  (A  proper 
solution
   to  non-ASCII characters in headers is offered by RFC 2047 and 
its

   predecessors.)

  reject8bit: 0
   If enabled, lmtpd rejects messages with 8-bit  characters  in 
the

   headers.
--
.:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.
  .:.:.:.Skype: shagedorn.:.:.:.

pgp4l8WLFAMAr.pgp
Description: PGP signature

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Alexey Lobanov
Hello.

13.02.2008 11:50, Simon Matter пишет:

>> Hello.
>>
>> See http://archives.neohapsis.com/archives/postfix/2008-01/1321.html
> 
> Yes, but that will block possibly valid mail. Of course I don't accept
> mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it, but
> I should accept non-ASCII MAIL FROM addresses if they are valid. 

In my understanding, "non-ASCII MAIL FROM addresses" may not be valid at
all, by basic mail RFCs. Note that I live in a very non-ASCII
environment :-) and receive a lot of legitimate mail with Cyrillic
realnames and subjects. It is seen properly if Sender's MUA respects RFC
1342 "Representation of Non-ASCII Text in Internet Message Headers" or
is converted to X by Cyrus if the MUA is dumb.

> But Cyrus
> also refuses them. That's the real problem.

I have asked this question in Postfix maillist because I got some spam
with non-ascii symbols in envelope-from. And I confirm that the recipe
works exactly as desired and does not affect any legitimate mail with
Russian sender names or subjects.

Are you sure that your problem differs from my one?

Alexey



> 
> Simon
> 
> 
> 
> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Rob Mueller

> Yes, but that will block possibly valid mail. Of course I don't accept
> mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it, but
> I should accept non-ASCII MAIL FROM addresses if they are valid. But Cyrus
> also refuses them. That's the real problem.

Can you turn off the 8BITMIME extension that postfix advertises? It seems 
from the RFC (http://tools.ietf.org/html/rfc4952), if 8BITMIME isn't 
advertised, then it's up to the sending side to downgrade the SMTP 
transaction to ASCII, and then you could block non-ASCII MAIL FROM 
addresses...

Rob




Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyradm - bug or incorrect settings ?

2008-02-13 Thread Alain Spineux
On Feb 13, 2008 7:10 AM, Oleg Kostyuk <[EMAIL PROTECTED]> wrote:
> 2008/2/13, Alain Spineux <[EMAIL PROTECTED]>:
>
> > On Feb 12, 2008 10:32 PM, Oleg Kostyuk <[EMAIL PROTECTED]> wrote:
> > > Hello all!
> > > I have problem with connecting to cyrus via cyradm.
> > > This my configuration:
> > >
> > > === from imapd.conf ===
> > > virtdomains: userid
> > > defaultdomain: cub.org.ua
> > > loginrealms: cub.org.ua home.cub.org.ua
> > > sasl_pwcheck_method: auxprop
> > > sasl_auxprop_plugin: sql
> > > sasl_mech_list: PLAIN
> > > sasl_sql_engine: sqlite
> > > sasl_sql_database: /etc/sasldb2.sqlite
> > > sasl_sql_select: select password from sasl_users where username = '%u'
> > > and domain='%r'
> > > === end imapd.conf ===
> > >
> > >
> > > === from sasldb2.sqlite ===
> > > # echo "select username, domain, password from sasl_users;" | sqlite
> > > /etc/sasldb2.sqlite
> > > cyrus||MailAdmin
> > > cyrus|cub.org.ua|MailAdmin
> > > #
> > > === end sasldb2.sqlite ===
> > >
> > >
> > > === from host command line ===
> > > # hostname
> > > hosting
> > > # hostname -f
> > > hosting.cub.org.ua
> > > # ls -la /etc/sasldb2.sqlite
> > > -rw-rw 1 cyrus sasl 4096 2008-02-12 18:25 /etc/sasldb2.sqlite
> > > #
> > > === end of host command line ===
> > >
> > > === try to connect ===
> > > # cyradm --user [EMAIL PROTECTED] localhost
> > > IMAP Password:
> > >at /usr/lib/perl5/Cyrus/IMAP/Admin.pm line 119
> > > cyradm: cannot authenticate to server as [EMAIL PROTECTED]
> > > #
> > > === end of try ===
> > >
> > > === errors in log ===
> > > ==> /var/log/auth.log <==
> > > Feb 12 18:27:10 hosting cyrus/imap[9940]: sql auxprop plugin using sqlite 
> > > engine
> > > Feb 12 18:27:10 hosting perl: No worthy mechs found
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username 
> > > cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a 
> > > host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username 
> > > cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a 
> > > host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin Parse the username 
> > > cyrus
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin try and connect to a 
> > > host
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin trying to open db
> > > '/etc/sasldb2.sqlite' on host 'localhost'
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: begin transaction
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin: unable to open
> > > database file
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: Unable to begin transaction
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin create statement
> > > from userPassword cyrus hosting
> > > Feb 12 18:27:14 hosting cyrus/imap[9940]: sql plugin doing query
> > > select password from sasl_users where username = 'cyrus' and
> > > domain='hosting';
> > >
> > > ==> /var/log/syslog <==
> > > Feb 12 18:27:16 hosting cyrus/master[9803]: process 9940 exited,
> > > signaled to death by 11
> > > Feb 12 18:27:16 hosting cyrus/master[9803]: service imap pid 9940 in
> > > BUSY state: terminated abnormally
> > > === end of errors ===
> > >
> > > And finally, my questions:
> > > 1) why cyradm tries "hosting" realm, instead of "cub.org.ua" ? This is
> > > bug or my mistake ?
> >
> > can you make a
> > # grep  localhost /etc/hosts
> > Do you have "hosting" on this line too ?
>
> # grep -E localhost\|hosting /etc/hosts
> 127.0.0.1   localhost
> 127.0.1.1   hosting.cub.org.ua  hosting
> #

This is unusual but it should work. I would have used :

127.0.0.1   hosting.cub.org.ua  hosting localhost
or
127.0.0.1localhost
1.2.3.4   hosting.cub.org.ua  hosting

with 1.2.3.4 one of the ip address of the server, one that would never change.

Then I dont know why it is using hosting as your realm

>
> This is my first debian install, and it's something strange to me (127.0.1.1 
> :)
> Is this should be corrected?
>
> > > 2) from where coming "sql plugin: unable to open database file" error ?
> >
> > Can you try a
> > # chmod 666 /etc/sasldb2.sqlite
> > just for testing ?
>
> Already tried, but unfortunately this not help - all work exactly same
> way with 0666 and 0660

Do you still have the error about "sql plugin: unable to open database file".

I have no more idea and coonot help you more.

>
>
>
> > > Btw, if I create entry in database with domain == "hosting" - all
> > > things work correctly (except ignoring "cub.org.ua" realm).
> > > I'm using Debian Etch, and all software installed from stable branch
> > > (cyrus is 2.2.13-10 and sasl2 is 2.1.22.dfsg1-8).
>
> --
> Sincerely yours,
> Oleg Kostyuk (CUB-UANIC)
>



--

Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Simon Matter
> Hello.
>
> See http://archives.neohapsis.com/archives/postfix/2008-01/1321.html

Yes, but that will block possibly valid mail. Of course I don't accept
mail with non-ASCII RCPT TO addresses because Cyrus doesn't allow it, but
I should accept non-ASCII MAIL FROM addresses if they are valid. But Cyrus
also refuses them. That's the real problem.

Simon



Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Non-ASCII chars in MAIL FROM envelope

2008-02-13 Thread Alexey Lobanov
Hello.

See http://archives.neohapsis.com/archives/postfix/2008-01/1321.html

13.02.2008 10:40, Simon Matter пишет:

> Hi,
> 
> Running postfix as an MTA I have the problem that postfix accepts mail
> with non-ASCII chars in MAIL FROM envelope and cyrus-imapd's lmtpd rejects
> them with "501 5.5.4 Syntax error in parameters".

Alexey

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html