Re: Sieve by the addressee

2021-02-20 Thread Darac Marjal

On 20/02/2021 18:02, Shawn Heisey wrote:
> On 2/20/2021 8:50 AM, Markus Schönhaber wrote:
>> I consider it a better idea to filter mailing list messages by their
>> List-ID header.
>
> I agree with Markus.  It's what I do.  This works well:
>
> if header :regex "list-id" "solr-user.lucene.apache.org"
> {
>     fileinto "asf.solr-user";
>     stop;
> }
>
> I do not know if List-ID is common to all mailing list software, but
> even if it's not, there should be something available in the message
> headers that you can use.

It's not, but it's fairly common. A few years ago someone posted a
strategy for procmail that handled almost any kind of mailinglist
software. I've translated that to the following sieve script (which, now
that I look at it, could probably do with a bit of optimisation):

# split out the various list forms
# Apparently, mutt-users has some odd format, so handle it specially.
if exists "list-post" {
      if header :regex "list-post" "
> Thanks,
> Shawn


OpenPGP_signature
Description: OpenPGP digital signature


Re: Messages sent to alias+detail end up in INBOX

2021-02-18 Thread Darac Marjal

On 18/02/2021 12:53, Yassine Chaouche wrote:
> Yo Denis,
>
> As bjoern and Anton already said, you need a sieve script
> that has a rule that says every mail that has the "detail"
> keyword in the "to" header must go to the "detail" folder.
>
> It works with static values. But I don't know if you can
> dynmicaly create folders with the "detail" part put in a
> variable for example, ask the sieve to create it if it
> doesn't exist, then deliver mail to it.

What I use is:

if envelope :detail :regex "to" "(.+)" {
    set :upperfirst :lower "detail" "${1}";
    fileinto :create "Tagged/${detail}";
    stop;
}

Which says "if the envelope detail is not empty, copy it to a variable
called 'detail' and titlecase it, then file the message into
Tagged/$detail, creating that if necessary". I think the most relevant
part here is using a regex to match on the detail - that copies the
value of the detail into $1, which you can then use as you see fit.


>
> Yassine
>
> Le 2/18/21 à 1:27 PM, Bjoern Franke a écrit :
>> Hi,
>>
>>> So, there is now way that Dovecot can create folders with "detail"
>>> name for mail sent to "alias+detail" address?
>>>
>> did you take a look into the logs? E.g. in my setup, dovecot complains
>> when sieve should put the message into a folder which does not exist.
>>
>> Maybe it logs something also in your case why it does not create the
>> folder.
>>
>> Regards
>> Bjoern
>



OpenPGP_signature
Description: OpenPGP digital signature


Re: Dovecot and mutt

2021-01-25 Thread Darac Marjal

On 25/01/2021 09:08, Rupert Gallagher wrote:
> It would be useful to automatically de-HTML e-mails, but this is not a
> task for dovecot. Even more useful would be to deprecate HTML in e-mails.

Why would it be useful to deprecate HTML in emails? Presumably you're
arguing for an alternative, more restricted markup language such as
Enriched Text[1], Markdown[2]? Mutt already supports Enriched Text, but
is probably the most popular MUA which does. I'm not aware of an MUA
that natively renders Markdown bodies - most of the tutorials I see
about that involve composing the message in Markdown and then converting
it to HTML for sending - but to be honest, at this point the effort is a
bit late. Realistically, how are you going to render that Markdown text
in a Graphical MUA? Either you're going to write a custom control which
renders the markup as styled text (that is, converts **bold** to a
bold-face font etc) or you're just going to run the Markdown through a
Markdown->HTML converter and pass it to a Web Browser component (both
the converter and the renderer are "solved problems" so guess which
solution developers would choose), in which case, what's the point of
going "around the houses"?


[1] https://en.wikipedia.org/wiki/Enriched_text

[2] https://en.wikipedia.org/wiki/Markdown


>
>
>
>  Original Message 
> On Jan 20, 2021, 13:58, @lbutlr < krem...@kreme.com> wrote:
>
>
> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> > On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
> >> set imap_pass = "lasH-hds[er$asd" # Not a real password
> >
> > Use single quotes around the password. Double quotes make $asd to be
> > interpreted as shell variable and replaced with (most likely) empty
> > string, so you get a shortened passwort in effect.
>
> This worked, thank you.
>
> Also… gr. Who though expansion inside a password string was a
> clever idea and can I introduce them to a clue bat? :p
>
> > PS. Also a mutt lover :-)
>
> With the amount of HTML mail out there I really don't understand
> how people are able to use it anymore. Now, if I could get a 'stip
> html down to plain text' side function to work…
>
> script execution error (#127): sh: line 3: fortune: command not found
>


OpenPGP_signature
Description: OpenPGP digital signature


Re: hosting emails at home

2017-12-11 Thread Darac Marjal

On Sun, Dec 10, 2017 at 11:23:34AM -0800, Kenneth Porter wrote:
--On Sunday, December 10, 2017 7:05 PM + André Rodier 
 wrote:



This is so far what I have achieved:


How about MIMEDefang, ClamAV, and SpamAssassin? I'm currently running 
MD+Clam from sendmail and SA from procmail, but I'm open to seeing the 
equivalent solution with Postfix and the Dovecot LDA.


(One thing that keeps me from switching to Postfix is the need to 
accept "plussed" addresses using both the plus sign and the dot (for 
websites that refuse "+" in an email address).)


That's relatively easy. I use the following:

In main.cf:
recipient_delimiter = +
canonical_maps = pcre:/etc/postfix/canonical

In /etc/postfix/canonical:
/^([^\.]+)\.([^\.]+)@(darac\.org\.uk)$/ ${1}+${2}@${3}

The regex can probably be simplified a lot, but to me that's clear that 
foo@darac.org.uk gets mapped to foo+...@darac.org.uk.


That means that I can use plus addressing where it's supported and dot 
addressing where it isn't. From the server's point of view, it's all 
plus-addressed, but I've not yet come across a domain that doesn't like 
(SMTP) mail with a + in the from field (it's usually just the web forms 
that complain).



--
For more information, please reread.


signature.asc
Description: PGP signature


Re: Dovecot and Letsencrypt certs

2017-09-08 Thread Darac Marjal

On Fri, Sep 08, 2017 at 06:47:25AM -0600, @lbutlr wrote:

So this morning at 4am I was awoken to my mail clients getting certificate 
errors for an expired certificate.

I hopped on to the server and checked and… no, the LE certs renewed last month 
and are valid until November.

After some moments of confusion I noticed that dovecot had been running since 
before the renewal, so I did a quick service dovecot restart which fixed 
everything.

Should dovecot check for certs being refreshed? Or is this an artifact of my 
using symbolic links everywhere to point to the newest LE certs (which are 
themselves links the dehydrate script creates to point to the newest 
cert-1502534746.csr etc files?


As you're using dehydrated, I can share what I do. My hook script 
basically calls "run-parts /etc/dehydrated/hooks.d/" so I can just drop 
hook scripts into that directory. Then in the hooks.d directory, I have 
the following:


#!/bin/bash

set -e
set -u
set -o pipefail

if [[ ${1} == "deploy_cert" && ${2} == "mail.darac.org.uk" ]]; then
echo " + Hook: Restarting Dovecot..."
/usr/sbin/service dovecot restart
fi

That means that dovecot will be restarted only if the certificate for the 
mail server is being deployed. If dehydrated runs, but fails to renew 
the certificate, then dovecot won't be restarted. Similarly, if it 
renews a different certificate, dovecot won't be restarted.


Hope that helps.




Should I just create a monthly cron to restart dovecot or is there something 
else?

--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.


--
For more information, please reread.


signature.asc
Description: PGP signature


Re: imapsieve: failed to read mailbox attribute

2017-08-23 Thread Darac Marjal

On Wed, Aug 23, 2017 at 02:03:06PM +0200, Stephan Bosch wrote:



Op 22-8-2017 om 13:03 schreef Darac Marjal:

On Tue, Aug 22, 2017 at 01:55:45PM +0300, Aki Tuomi wrote:



On 22.08.2017 13:37, Darac Marjal wrote:

Hello all,

Hopefully this is something fairly simple.

I've been trying to set up the Sieve Antispam system as detailed at
https://wiki2.dovecot.org/HowTo/AntispamWithSieve, but at the moment,
whenever I change mailboxes I get the following message logged:

  Aug 22 09:30:45 remy dovecot: imap(da...@darac.org.uk): Error:
imapsieve: mailbox INBOX: Failed to read /shared/imapsieve/script
mailbox attribute

and my script does not run when I move files between folders.

My sieve files are chmod'ed 0644 and the shell script used to pipe
into spamassassin is 0755, so it *should* work, shouldn't it? Is there
something I've missed?



Can you show doveconf -n and your sieve scripts?


Looks like you didn't configure Dovecot for use of the IMAP METADATA 
extension. That is a prerequisite for providing IMAPSIEVE support to 
your users.


https://wiki.dovecot.org/ImapMetadata


Excellent. Yes, that seems to have fixed it. Thank you.



The main missing configuration is the mail_attribute_dict setting.

The error message you got was very unhelpful. That is fixed now:

https://github.com/dovecot/pigeonhole/commit/dc20a45fae8c5e402d1493847c38d72c9670c64e

Regards,

Stephan.



--
For more information, please reread.


signature.asc
Description: PGP signature


Re: imapsieve: failed to read mailbox attribute

2017-08-22 Thread Darac Marjal

On Tue, Aug 22, 2017 at 01:55:45PM +0300, Aki Tuomi wrote:



On 22.08.2017 13:37, Darac Marjal wrote:

Hello all,

Hopefully this is something fairly simple.

I've been trying to set up the Sieve Antispam system as detailed at
https://wiki2.dovecot.org/HowTo/AntispamWithSieve, but at the moment,
whenever I change mailboxes I get the following message logged:

  Aug 22 09:30:45 remy dovecot: imap(da...@darac.org.uk): Error:
imapsieve: mailbox INBOX: Failed to read /shared/imapsieve/script
mailbox attribute

and my script does not run when I move files between folders.

My sieve files are chmod'ed 0644 and the shell script used to pipe
into spamassassin is 0755, so it *should* work, shouldn't it? Is there
something I've missed?



Can you show doveconf -n and your sieve scripts?

Aki


Certainly:

---8<---  doveconf -n  ---8<---

# 2.2.31 (65cde28): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.19 (e5c7051)
# OS: Linux 4.9.0-1-686-pae i686 Debian buster/sid xfs
auth_mechanisms = digest-md5 cram-md5 plain
auth_verbose = yes
imap_id_log = *
info_log_path = /var/log/dovecot.info
lda_mailbox_autosubscribe = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_log_format_elements = service=%s user=<%u> session=%{session} method=%m 
rip=%r lip=%l mpid=%e %c %k
mail_access_groups = mail users
mail_gid = vmail
mail_home = /var/mail/%u
mail_location = mdbox:/var/mail/%u/Mail
mail_max_userip_connections = 50
mail_plugins = " zlib fts fts_lucene stats fts fts_lucene stats"
mail_privileged_group = mail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date index ihave duplicate 
mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve vnd.dovecot.pipe 
vnd.dovecot.execute
namespace {
 hidden = no
 ignore_on_failure = yes
 inbox = no
 list = children
 location = mbox:~/archive:INDEX=~/archive-indexes
 prefix = _ARCHIVE/
 subscriptions = no
}
namespace {
 hidden = no
 inbox = no
 list = yes
 location = mdbox:/var/mail/%u/Mail:MAILBOXDIR=expunged
 prefix = .EXPUNGED/
 subscriptions = no
}
namespace inbox {
 inbox = yes
 location = 
 mailbox Drafts {

   special_use = \Drafts
 }
 mailbox Junk {
   special_use = \Junk
 }
 mailbox Sent {
   special_use = \Sent
 }
 mailbox "Sent Messages" {
   special_use = \Sent
 }
 mailbox Trash {
   special_use = \Trash
 }
 prefix = 
}

passdb {
 args = /etc/dovecot/passwd
 driver = passwd-file
}
plugin {
 antispam_backend = pipe
 antispam_crm_binary = /bin/false
 antispam_debug_target = syslog
 antispam_pipe_program = /usr/bin/sa-learn-pipe.sh
 antispam_pipe_program_notspam_arg = --ham
 antispam_pipe_program_spam_arg = --spam
 antispam_pipe_tmpdir = /tmp
 antispam_spam_pattern_ignorecase = SPAM
 antispam_trash_pattern_ignorecase = trash;Deleted *
 fts = lucene
 fts_lucene = whitespace_chars=@.
 imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/learn-spam.sieve
 imapsieve_mailbox1_causes = COPY
 imapsieve_mailbox1_name = Spam
 imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/learn-spam.sieve
 imapsieve_mailbox2_causes = COPY
 imapsieve_mailbox2_name = spam
 imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/learn-ham.sieve
 imapsieve_mailbox3_causes = COPY
 imapsieve_mailbox3_from = Spam
 imapsieve_mailbox3_name = *
 imapsieve_mailbox4_before = file:/usr/lib/dovecot/sieve/learn-ham.sieve
 imapsieve_mailbox4_causes = COPY
 imapsieve_mailbox4_from = spam
 imapsieve_mailbox4_name = *
 imapsieve_url = sieve://mail.darac.org.uk
 lazy_expunge = .EXPUNGED/
 sieve = file:~/sieve;active=~/.dovecot.sieve
 sieve_execute_bin_dir = /usr/lib/dovecot/sieve
 sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
 sieve_pipe_bin_dir = /usr/lib/dovecot/sieve
 sieve_plugins = sieve_imapsieve sieve_extprograms
 sieve_spamtest_max_header = X-Spam-Score: 
score=-?[[:digit:]]+\.[[:digit:]].*required=([[:digit:]]+\.[[:digit:]])
 sieve_spamtest_status_header = X-Spam-Score: 
score=(-?[[:digit:]]+\.[[:digit:]]).*
 sieve_spamtest_status_type = score
 stats_refresh = 30 secs
 stats_track_cmds = yes
 zlib_save = lz4
 zlib_save_level = 2
}
postmaster_address = postmas...@darac.org.uk
protocols = " imap lmtp sieve"
service auth {
 unix_listener /var/spool/postfix/private/auth {
   group = postfix
   mode = 0660
   user = postfix
 }
 unix_listener auth-userdb {
   group = vmail
   mode = 0777
   user = vmail
 }
}
service lmtp {
 inet_listener lmtp {
   address = 192.168.101.8
   port = 20024
 }
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0666
   user = postfix
 }
}
service managesieve-login {
 inet_listener sieve {
   port = 4190
 }
 inet_listener sieve_deprecated {
   port = 2000
 }
}
service stats {
 fifo_listener stats-mail {
   mode = 0600
   user = vmail
 }
}
ssl_cert = 

signature.asc
Description: PGP signature


imapsieve: failed to read mailbox attribute

2017-08-22 Thread Darac Marjal

Hello all,

Hopefully this is something fairly simple.

I've been trying to set up the Sieve Antispam system as detailed at 
https://wiki2.dovecot.org/HowTo/AntispamWithSieve, but at the moment, 
whenever I change mailboxes I get the following message logged:


  Aug 22 09:30:45 remy dovecot: imap(da...@darac.org.uk): Error: imapsieve: 
mailbox INBOX: Failed to read /shared/imapsieve/script mailbox attribute


and my script does not run when I move files between folders.

My sieve files are chmod'ed 0644 and the shell script used to pipe into 
spamassassin is 0755, so it *should* work, shouldn't it? Is there 
something I've missed?


--
For more information, please reread.


signature.asc
Description: PGP signature


Re: under another kind of attack

2017-07-25 Thread Darac Marjal

On Tue, Jul 25, 2017 at 04:37:23PM +0200, Olaf Hopp wrote:

Hi folks,

"somehow" similar to the thread "under some kind oof attack" started by "MJ":

I have dovecot shielded by fail2ban which works fine.
But since a few days I see many many IPs per day knocking on
my doors with wron password and/or users. But the rate at which they are 
knocking
is very very low. So fail2ban will never catch them.


Of course it will. You just need to set the "findtime" high enough.
Personally, on my very quiet home server, I have findtime set to 7200 (2
hours) and maxretry set to 5, meaning that if a host fails to
authenticate 5 times in two hours, they're banned (I have a fairly harsh
ban time of a week, so that stops them coming back too soon).



For example one IP:

Jul 25 14:03:17 irams1 dovecot: auth-worker(2212): 
pam(eurodisc,101.231.247.210,): unknown user
Jul 25 15:16:36 irams1 dovecot: auth-worker(11047): 
pam(gergei,101.231.247.210,): pam_authenticate() failed: 
Authentication failure (password mismatch?)
Jul 25 16:08:51 irams1 dovecot: auth-worker(3379): 
pam(icpe,101.231.247.210,): unknown user
Jul 25 16:10:47 irams1 dovecot: auth-worker(4250): 
pam(endsulei,101.231.247.210,): unknown user

Note the timestamps.
If I look the other way round (tries to one account) I'll get

Jul 25 01:30:48 irams1 dovecot: auth-worker(11276): 
pam(endsulei,60.166.12.117,): unknown user
Jul 25 01:31:26 irams1 dovecot: auth-worker(11276): 
pam(endsulei,222.243.211.200,): unknown user
Jul 25 13:29:22 irams1 dovecot: auth-worker(4745): 
pam(endsulei,60.2.50.114,<4elhpCJVtcw8AjJy>): unknown user
Jul 25 13:30:27 irams1 dovecot: auth-worker(4747): 
pam(endsulei,222.84.118.83,): unknown user
Jul 25 16:10:47 irams1 dovecot: auth-worker(4250): 
pam(endsulei,101.231.247.210,): unknown user
Jul 25 16:11:45 irams1 dovecot: auth-worker(5933): 
pam(endsulei,206.214.0.120,): unknown user

Also note the timestamps!

And I see many many distinct IPs per day (a few hundred) trying many many 
existing and non-existings accounts.
As you see in the timestamps in my examples, this can not be handled by 
fail2ban without affecting
regular users with typos.
Is anybody observing something similar ?
Anybody an idea against this ?
Many of these observed IPs are chinese mobile IPs, if this matters. But we have 
also chinese students and
researchers all abroad.


Regards,
Olaf

--
Karlsruher Institut für Technologie (KIT)
ATIS - Abt. Technische Infrastruktur, Fakultät für Informatik

Dipl.-Geophys. Olaf Hopp
- Leitung IT-Dienste -

Am Fasanengarten 5, Gebäude 50.34, Raum 009
76131 Karlsruhe
Telefon: +49 721 608-43973
Fax: +49 721 608-46699
E-Mail: olaf.h...@kit.edu
atis.informatik.kit.edu

www.kit.edu

KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft

Das KIT ist seit 2010 als familiengerechte Hochschule zertifiziert.






--
For more information, please reread.


signature.asc
Description: PGP signature


Re: Dovecot/Sieve shortcuts?

2017-05-10 Thread Darac Marjal

On Tue, May 09, 2017 at 11:27:22AM -0500, Larry Rosenman wrote:

On 5/9/17, 11:25 AM, "dovecot on behalf of Christian Kivalo" 
 wrote:



   Am 9. Mai 2017 17:47:13 MESZ schrieb Adam Shostack :
   >Hi,
   >
   >Is there a clean way to match on an email address the way procmail
   >^TO_ did?  that was a macro which expanded to
   >(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope
   >|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)
   >
   >so you could write
   >* ^TO_dovecot
   >dovecot
   >
   >and grab messages to the list.  In sieve, I find myseld writing
   >["To","cc"] and wonder if there's a better way.
   You could use the X-BeenThere or List-Id headers to match mailing list 
traffic

   --
   Christian Kivalo
   >
   >Adam

I’ve been using:

if header :contains ["List-Id","Mailing-List",
   "Sender","X-List-Name","List-Post"]
[""]
{
  fileinto "lists/php/general";
  stop;
}

For all my mailing list traffic.  That seems(!) to catch most of them.


I can't remember where I got the original algorithm (and, in particular,
the ordering) from, but I've been using the attached sieve script for a
while with numerous mailinglists. It uses the 'regex' module to parse
the mailing-list name from the headers (with various attempts to handle
most of the major mailing-list applications). The listname is
lower-cased (for consistency) and the message is filed into that folder 
(creating the folder if necessary). This means that, when I sign up for a new 
mailing-list, messages just start appearing in their own folder.

--
For more information, please reread.


mailinglist.sieve
Description: application/sieve


signature.asc
Description: PGP signature


Re: Replacement for antispam plugin

2017-02-10 Thread Darac Marjal

On Fri, Feb 10, 2017 at 03:52:52PM +0100, Ralph Seichter wrote:

On 10.02.2017 09:06, Aki Tuomi wrote:


Since antispam plugin is deprecated and we would really prefer people
not to use it, we wrote instructions on how to replace it with IMAPSieve.


In my setup, I use the following sieve script globally for all users:

 if header :is "X-Spam-Flag" "YES" {
   fileinto "Junk";
   stop;
 }

This allows processing based on spam flags set by Amavis/SpamAssassin.
I wonder if the method shown in

 https://wiki.dovecot.org/HowTo/AntispamWithSieve

will cause incoming mail (via LMTP) that is already flagged as spam to
be processed by report-spam.sieve and, in consequence, will be learned
as spam for a second time, which would of course be undesirable?


It shouldn't do. Check out 
https://wiki.dovecot.org/Pigeonhole/Sieve/Plugins/IMAPSieve, which 
explains that sieve is normally only used at delivery time, but the 
sieve_imapsieve plugin runs a *different* sieve script based on IMAP 
actions (for example, COPY).


So, when you deliver, your main script tells dovecot WHERE to deliver 
to. When you issue and IMAP COPY command, the Antispam scripts tell 
dovecot to pipe the message to spamassassin. The delivery does not 
involve IMAP and the IMAP COPY does not constitute redelivery.



--
For more information, please reread.


Re: Correct settings for ssl protocols" and "ssl ciphers"

2017-01-17 Thread Darac Marjal

On Tue, Jan 17, 2017 at 07:55:15AM -0500, Jerry wrote:

I have the following two settings in my "10-ssl.conf" file

# SSL protocols to use
ssl_protocols = !SSLv2

# SSL ciphers to use
ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL

I have seen different configurations while Googling. I am wondering
what the consensus is for the best settings for these two items. What
do the developers recommend?


Not a developer, but I use the settings from https://cipherli.st, 
namely:


ssl = yes
ssl_cert = Dovecot 2.2.6
ssl_dh_parameters_length = 4096 # >Dovecot 2.2



Thanks!

--
Jerry


--
For more information, please reread.


Re: Remove empty milder folders

2017-01-16 Thread Darac Marjal

On Mon, Jan 16, 2017 at 07:03:49AM -0700, @lbutlr wrote:

Not sure if anyone will find this useful, but this is how I deleted a bunch 
(several hundred) of empty mail folders from a user account:

# doveadm mailbox status -u “u...@example.com" messages "*" ALL | grep "=0" | awk -F= 
'{print $1}' | awk '{print "rm -rf ."$1}' > list

then I looked over list just to be sure it wasn’t mucked up and in the users 
root maildir:

# sh < list

and done.

I probably could do some research on how to combine those two awk pipes but 
this worked, and it was fast.


You may also want to *consider* removing those mailboxes from your 
subscriptions, too. I ran into this recently and IMAP considers the list 
of folders that exist and the list of folders that are subscribed to be 
separate entities. The RFCs specifically say that deleting a folder 
should not invalidate the subscription (presumably because you might 
want to remain subscribed to it if it comes back). If you don't 
unsubscribe, then some MUAs will show your folders as "greyed out".


So, depending on what you're trying to do, you might want to "doveadm 
mailbox unsubscribe -u "u...@example.com" $MAILBOX".




--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.


--
For more information, please reread.


Re: Rebuild UIDs for mdbox

2016-11-28 Thread Darac Marjal

On Sun, Nov 27, 2016 at 11:45:10PM -0700, @lbutlr wrote:

On Nov 27, 2016, at 1:41 PM, Darac Marjal <mailingl...@darac.org.uk> wrote:

Firstly, that page states that UIDs should be 32-bit integers. If so,
why do there appear to be UIDs greater than 3 billion in the mailbox?


Because 32 bits hold 4 billion decimal?

2^32 = 4,294,967,296


Ah, yes. It's a bug in claws-mail then. It *IS* storing the UID in an 
unsigned int, but then comparing it to G_MAXINT which is the signed 
maximum.


Sorry for the noise.



(this is why FAT32 has a 4GB file size limit).


--
For more information, please reread.


Rebuild UIDs for mdbox

2016-11-27 Thread Darac Marjal
Hello all,

I think I'm hitting an issue with overly large UIDs in one of my mailboxes.

I initially thought it was a problem with claws-mail hitting an infinite
loop. Claws-mail /seems/ to work fine, until it gets to this one
mailbox, wherein the following is logged:

[20:23:04] IMAP> 86 SELECT LocalCron
[20:23:04] IMAP< * OK [CLOSED] Previous mailbox closed.
[20:23:04] IMAP< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft Junk
NonJunk)
[20:23:04] IMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen
\Draft Junk NonJunk \*)] Flags permitted.
[20:23:04] IMAP< * 399 EXISTS
[20:23:04] IMAP< * 0 RECENT
[20:23:04] IMAP< * OK [UNSEEN 399] First unseen.
[20:23:04] IMAP< * OK [UIDVALIDITY 1163720154] UIDs valid
[20:23:04] IMAP< * OK [UIDNEXT 3069273506] Predicted next UID
[20:23:04] IMAP< * OK [HIGHESTMODSEQ 120748] Highest
[20:23:04] IMAP< 86 OK [READ-WRITE] Select completed (0.000 + 0.000 secs).
imap-thread.c:1344:imap select run - end 0
imap-thread.c:388:generic_cb
imap-thread.c:372:found imap 0x22c8f60
imap-thread.c:1431:imap select - end
imap.c:3961:select: exists 399 recent 0 expunge 0 uid_validity
1163720154 can_create_flags 1
imap-thread.c:2018:imap fetch_uid - begin
imap-thread.c:372:found imap 0x22c8f60
imap-thread.c:372:found imap 0x22c8f60
[20:23:04] IMAP- [fetching UIDs...]
[20:23:04] IMAP> 87 UID FETCH 1:* (UID)
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP<
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< FETCH (UID 3069273244)
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< TCH (UID 3069273313)
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< TCH (UID 3069273382)
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< TCH (UID 3069273451)
[20:23:04] IMAP< [FETCH data - 1024 bytes]
[20:23:04] IMAP< [FETCH data - 551 bytes]
imap-thread.c:2008:imap fetch_uid run - end 0
imap-thread.c:388:generic_cb
imap-thread.c:372:found imap 0x22c8f60
imap-thread.c:2029:imap fetch_uid - end
imap.c:542:unlocking session 0x22e4c00
imap.c:4663:get_num_list: got 399 msgs
imap.c:4673:removing old messages from
/home/darac/.claws-mail/imapcache/mail.darac.org.uk/da...@darac.org.uk/LocalCron
imap.c:4677:get_num_list - ok - 399
folder.c:2265:Removed message 2147483647 from cache.


That last line (Removed message 2147483647 from cache) is repeated ad
infinitum. Now, I happened to spot that that number is 2^31 - 1 so
started looking to see if claws-mail was handling UIDs incorrectly. That
lead me to http://wiki.dovecot.org/Clients/NegativeUIDs.

Firstly, that page states that UIDs should be 32-bit integers. If so,
why do there appear to be UIDs greater than 3 billion in the mailbox?

Secondly, that page gives instructions on how to fix the problem with
mbox and maildir backends. However, my mail is stored in mdboxes. Is
there a way to re-generate UIDs for mdbox mailboxes?

Thanks in advance!



signature.asc
Description: OpenPGP digital signature


Re: Generalized looping possible in pigeonhole sieve?

2016-11-18 Thread Darac Marjal

On Thu, Nov 17, 2016 at 02:42:31PM -0800, Jeff Kletsky wrote:
I'm struggling to achieve the kind of filtering with sieve that I was 
able to do with procmail.


A couple of options that I can think of:

If the address is sufficiently like the folder name, you can use sieve's 
regex capabilities. For example, I convert addresses such as 
"user+fol...@example.com" to "Tagged/Folder" using:


	require [ "fileinto", "mailbox", "subaddress", "variables", "regex", 
	"envelope"];


if envelope :detail :regex "to" "(.+)" {
set :upperfirst :lower "detail" "${1}";
fileinto :create "Tagged/${detail}";
stop;
}

Another alternative is, if your map of addresses is complex, but doesn't 
change very often, use a script (such as a Makefile) to generate the 
sieve script from the map. Then, next time you update the map, you 
re-run the script which re-writes the sieve file.





TL;DR

I'd like a way to loop through a set of (address, destination) pairs 
in sieve so that I can maintain the (address, destination) pairs in 
one place and not have to explicitly write scores of nearly identical


[...]

if address :matches ["From", "Sender", "To", "Cc"] "address53" {
   fileinto "destination53"
}

if address :matches ["From", "Sender", "To", "Cc"] "address54" {
   fileinto "destination54"
}

[...]


Longer:

I've been using a table-based dispatch approach with procmail for 
years and it was working reasonably well.


The approach uses list of pairs of address and destination boxes and 
doing a lookup based on the message to be delivered. With procmail, I 
collected the list of addresses and passed them to external scripts to 
do the lookup.


If I just had a dozen boxes that I deal with, that would be 
straightforward to implement and maintain in sieve. As the list is an 
order of magnitude greater than that, maintaining the list of pairs in 
an external file and programmatically looping through it is a lot 
easier.


I've looked at vnd.dovecot.execute and it certainly can return a 
destination box name given the input information.


Unfortunately, the construct of (for example)

address :matches "To" "*"'

only returns the first address, not the list of addresses.

I can't see a good way to get all the addressees from sieve to pass to 
the external program. If I have to pass the message (or at least the 
interesting headers) to the external program and then parse the 
address list myself, then I'm nearly all the way to just using a 
full-on external program to parse the whole message.


While I'm not adverse to writing the whole thing in Python (or the 
like) and just using sieve as a thin shell, I'd like to make sure I'm 
not missing something in sieve.


One way to achieve this would be to be able to loop through the pairs 
and using variable substitution for each iteration. I haven't seen 
anything in Dovecot Pigeonhole sieve that allows this.


If you have any ideas on how to harness sieve for this, I'd appreciate it!


Jeff


--
For more information, please reread.


Re: dovecot-sieve help

2016-06-03 Thread Darac Marjal

On Fri, Jun 03, 2016 at 10:59:55AM +0800, 句号先生。 | wrote:

hi,
I have a question  hope to get everybody's help, thank you.
I write the dovecot sieve rules, use notify:mailto. such as mailto:mym...@dovecot.org, 
this is ok.but i want to go to a url address,like 
this,mailto:"http://http://wiki.dovecot.org/".but i don't know how to do it.I 
hope you can help me.thanks.


In this case, you're probably best off using the "pipe" extension[1], 
rather than "notify". Write a script that takes the email on STDIN and 
performs whatever necessary HTTP commands based on that (sending an 
email to a HTTP URL is too generic a process. Should it be POSTed to the 
address? Is there a form at the address which the mail should be posted 
to? Should certain fields be parsed out and a complex GET request be 
performed? etc. Only you know how that should work)


[1] http://master.wiki.dovecot.org/Pigeonhole/Sieve/Plugins/Extprograms

--
For more information, please reread.


signature.asc
Description: PGP signature


Re: Sorry, another faq

2015-06-12 Thread Darac Marjal
On Fri, Jun 12, 2015 at 03:01:17PM +0200, Daniel Tröder wrote:
 Am 12.06.2015 um 13:37 schrieb Martin S:
  I've installed a mailserver according to these instructions:
  http://www.server-world.info/en/note?os=CentOS_7p=httpdf=13
  When I try to login to the server through Roundcube webmail I get
  Connection to storage server failed.
  
  So checking on this
  
  [12-Jun-2015 11:28:53 +]: 6jap13r2 IMAP Error: Login failed for
  martin from 83.251.209.249. Could not connect to ssl://myserver:993:
  Permission denied in
  /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line
  198 (POST /roundcubemail/?
  
  /etc/roundcubemail/config.inc.php
  
  Has the following:
  $config['default_host'] = 'ssl://mail.myserver.tld'; [address obfuscated]
  $config['default_port'] = 993;
  
  as I understand should be correct.
  
  I've been looking at various posts on the net that says the problem is
  a permission on dovecot, but I fail to find anything to how to fix
  this as it looks right to me.
  
  Any suggestions?
  
  /Martin S
  
 * Test to connect to the IMAP server with telnet first:
 # telnet mail.myserver.tld 993
 If you cannot connect there is a network/firewall problem.

That won't work, as port 993 is IMAPS. openssl s_client -connect
mail.myserver.tld:993 should be considered an equivalent command.

 
 If you can connect →
 * Switch on all logging options in /etc/dovecot/conf.d/10.-logging.conf
 and follow the logfiles while trying with thunderbird/fetchmail/roundcube.
 



-- 
For more information, please reread.


signature.asc
Description: Digital signature


Re: [dovecot] Extra help, Hotmail nightmare

2015-04-27 Thread Darac Marjal
On Mon, Apr 27, 2015 at 03:46:30PM +0100, Jorge Bastos wrote:
 Hi,
 
  
 
 Some extra help.
 
 How would I make hotmail accept my emails and not make them go to junk
 folder?
 
 Is there any trick to do this?

This isn't really a dovecot issue, but you can start with Microsoft's
policies here: https://mail.live.com/mail/policies.aspx

 
  
 
 Thanks in advanced,
 
 Jorge Bastos


signature.asc
Description: Digital signature


Re: libdriver_msql.so

2015-03-11 Thread Darac Marjal
On Wed, Mar 11, 2015 at 03:37:48PM +0100, kaniggl wrote:
 Hello,
 
 i installed dovecot 2.11.1 on ubuntu
 Linux dadd3041 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:11 UTC
 2015 ppc64le ppc64le ppc64le GNU/Linux
 
 To make it clear, architecture is PowerPC 64bit
 Then i installed dovecot via apt-get. But the file
 /usr/lib/dovecot/modules/auth/libdriver_mysql.so
 is missing.

According to https://launchpad.net/ubuntu/+source/dovecot, Ubuntu is
still on Dovecot 2.2.9. According to http://dovecot.org/, upstream is
only at 2.2.15. Where did you find dovecot version 2.11.1 and can you
tell us the Lotto numbers, please?

Try dpkg -L dovecot-mysql to list files installed by the dovecot-mysql
package.

 
 So i compiled dovecot myself on this system and got a file
 /usr/lib/dovecot/modules/auth/libdriver_mysql.so
 
 Then i restartetd the server and try to do a login via a webmailer
 (roundcube), but i get no connection to the database server.
 
 This is found in /var/log/mail.log
 Mar 11 15:19:04 dadd3041 dovecot: master: Dovecot v2.2.9 starting up (core
 dumps disabled)
 Mar 11 15:19:04 dadd3041 postfix/master[3367]: reload -- version 2.11.1,
 configuration /etc/postfix
 Mar 11 15:19:04 dadd3041 postfix/master[3367]: terminating on signal 15
 Mar 11 15:19:04 dadd3041 postfix/master[3597]: daemon started -- version
 2.11.1, configuration /etc/postfix
 Mar 11 15:19:25 dadd3041 dovecot: auth: Error:
 dlopen(/usr/lib/dovecot/modules/auth/libdriver_mysql.so) failed:
 /usr/lib/dovecot/modules/auth/libdriver_mysql.so: wrong ELF class:
 ELFCLASS32
 Mar 11 15:19:25 dadd3041 dovecot: auth: Fatal: Unknown database driver
 'mysql'
 Mar 11 15:19:25 dadd3041 dovecot: master: Error: service(auth): command
 startup failed, throttling for 2 secs
 Mar 11 15:19:25 dadd3041 dovecot: imap-login: Disconnected: Auth process
 broken (disconnected before auth was ready, waited 0 secs): user=,
 rip=::1, lip=::1, TLS handshaking,
 session=rJpS9AMR9wAB
 
 I know this means it is not a 64bit object but how could i achieve to get
 right one?
 
 best regards,
 kaniggl


signature.asc
Description: Digital signature


Re: sieve: is it possible to filter ALL mailing lists (with header List-Id) to their folders with ONE rule?

2014-09-15 Thread Darac Marjal
On Fri, Sep 12, 2014 at 10:25:19PM +0400, Lev Serebryakov wrote:
 Hello, Dovecot.
 
 
  Is it possible to write one rule in sieve, which will:
 
 (1) Trigger on any message with List-Id header
 
 AND
 
 (2) Put this message to folder with name build from content of List-Id
 header, in such way, that message with List-Id
 
 List-Id: This is decription of list list-name.host.org
 
  will be put into folder org.host.list-name where . is namespace
 separator (so, such folders will be shown as hierarchy in mail client)?
 
  I don't want to write ~50 rules by hands and add new ones from time to
 time.
 
  I'm speaking about dovecot/pigeonhole sieve implementation, of course. All
  examples on net shows only manual one-rule-per-list approach :(


Not one rule, but I use the following script to filter mailing lists
into folders. It handles most mailing list types and, for consistency,
the folder name is case-folded to title case.

##
require [ regex, variables, fileinto, envelope, mailbox, imap4flags 
];

# Mailinglist Killfile
if anyof (header :contains from unwan...@example.com,
  header :contains from spam...@example.net,
  header :contains from tr...@example.org){
discard;
stop;
}

if anyof (header :contains x-spam-flag yes,
  allof (header :regex X-DSPAM-Result ^(Spam|Virus|Bl[ao]cklisted)$,
 not header :contains X-DSPAM-Reclassified Innocent)){
# Spam goes into the spam folder
setflag \\Seen;
fileinto :create spam;
stop;
}

# split out the various list forms
# Mailman  other lists using list-id
if exists list-id {
if header :regex list-id ([a-z_0-9-]+)[.@] {
set :lower listname ${1};
fileinto :create ${listname};
} else {
if header :regex list-id ^\\s*?([a-z_0-9-]+)[.@] {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
}
stop;}
# Listar and mailman like
elsif exists x-list-id {
if header :regex x-list-id ([a-z_0-9-]+). {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;}
# Ezmlm
elsif exists mailing-list {
if header :regex mailing-list ([a-z_0-9-]+)@ {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;}
# York lists service
elsif exists x-mailing-list {
if header :regex x-mailing-list ^\\s*([a-z_0-9-]+)@? {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;}
# Smartlist
elsif exists x-loop {
if header :regex x-loop ^\\s*(a-z_0-9-]+)@? {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;}
# poorly identified
elsif envelope :contains from owner- {
if envelope :regex from owner-([a-z_0-9-]+)-outgoing@ {
set :lower listname ${1};
fileinto :create ${listname};
} elsif envelope :regex from owner-([a-z_0-9-]+)@ {
set :lower listname ${1};
fileinto :create ${listname};
} elsif header :regex Sender owner-([a-z_0-9-]+)@ {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;}
# other poorly identified
elsif  envelope :contains from -request {
if envelope :regex from ([a-z_0-9-]+)-request@ {
set :lower listname ${1};
fileinto :create ${listname};
} else {
keep;
}
stop;
}



signature.asc
Description: Digital signature


Re: vsz_limit is 18,447 PB

2014-09-09 Thread Darac Marjal
On Mon, Sep 08, 2014 at 04:41:18PM -0700, Robert L Mathews wrote:
 On 9/8/14 3:38 PM, Jiri Bourek wrote: Hm, I can only guess (someone
 with more knowledge of dovecot source code
  probably knows better), but it seems like that value is magic number for
  not set. My doveconf outputs the same thing on services which don't
  have vsz_limit set explicitly, but when I list /proc/[pid]/limits on
  such a service, the row called Max address space (which is - AFAIK -
  limit on vsz) shows 2GB, a value of default_vsz_limit setting.
 
  I'd say don't overthink it, just put explicit vsz_limit = 512M into
  service imap section (if your machine's RAM allows) and be done with it.
 
 Right. According to my notes from when I upgraded to 2.x,
 18446744073709551615 means it's not set and that the default_vsz_limit
 will apply, which is 256 MB.

That seems sensible to me. 2^64 bytes is 18446744073709551616 (18.45EB),
so the number shown is (2^64 - 1). As a *limit* for a 64-bit program,
that seems about as close to no limit as you're going to get :)

 
 To avoid the problem the original poster had, I used:
 
  default_vsz_limit = 1 G
 
 -- 
 Robert L Mathews, Tiger Technologies, http://www.tigertech.net/


signature.asc
Description: Digital signature


Re: Android Sync Doesn't Work Too Good

2014-07-02 Thread Darac Marjal
On Tue, Jul 01, 2014 at 01:26:05PM -0700, Asai wrote:
 Am 01.07.2014 21:02, schrieb Asai:
 Greetings,
 
 I'm getting reports from a user who's reading and deleting mail on
 Thunderbird, but read flags and deletions don't show up in his Android
 phone.  He's using the native Android mail app with the newest Android OS.
 in imap mode ?
 Yes
 
 My question is, where do I start with troubleshooting this kind of
 issue?  Thanks for anyone's insight here. We're using Dovecot 2.2.13.
 
 look at the verbose logs, and dont expect android app to be a good imap
 client
 ( i never tried it that kind ) , better use k9 Mail with imap on Android
 
 
 https://code.google.com/p/k9mail/
 
 Thanks, Robert.  This user did once use K9, but they like the native app
 better...  I suggested to them that they double check the syncing in K9
 rather than native.

If it's the look of K9 they don't like, can I recommend K-@ Mail. K-@
Mail uses K9Mail's mail engines, but puts a modern interface on the top.


Re: [Dovecot] Dovecot ontop of glusterfs issue.

2014-05-22 Thread Darac Marjal
On Thu, May 22, 2014 at 01:48:23PM +0300, Eliezer Croitoru wrote:
 Well manually using a crontab with ntpdate to a pool of servers should be
 good enough right?

Not really. NTPdate steps the clock forward or backwards
instantaneously. Depending on how bad your system clock is, that could
be a jump of several seconds. Now, which came first? This midnight or
that midnight?

NTPd, on the other hand, delicately adjusts the clock frequency so that
the clock drifts back into synchronisation. So your seconds might be
0.01% shorter than real, but they still all happen in the right
sequence.

ntpdate is really only any good being run once (at boot), for example if
you have a clock that can't keep time while the system is off.

 
 Eliezer
 
 On 05/22/2014 07:09 AM, Murray Trainer wrote:
 Hi Eliezer,
 
 We had the same errors a few weeks ago.  Turned out the time on our NFS
 server was out by over 30 secs as NTP wasn't setup correctly .  Looks like
 the time on one of yours is out by about 250 secs (361-105).
 
 Murray


signature.asc
Description: Digital signature


Re: [Dovecot] Segfault in auth (when talked to by postfix lda)

2014-05-02 Thread Darac Marjal
On Fri, May 02, 2014 at 11:40:58AM +0300, Timo Sirainen wrote:
 On 25.4.2014, at 17.53, Darac Marjal mailingl...@darac.org.uk wrote:
 
  I'm seeing a segfault in dovecot 2.2.12 (debian package 1:2.2.12-2). I
  can log into dovecot fine with mutt, but the segfaults seem to occur
  when postfix (2.11.0, debian package 2.11.0-1+b1) tries to deliver a
  message.
 ..
  #0  auth_fields_find_idx (fields=fields@entry=0x0, key=key@entry=0xb84ae448 
  uid,
 idx_r=idx_r@entry=0xbfc07d0c) at auth-fields.c:44
 i = optimized out
 count = optimized out
  #1  0xb77bed33 in auth_fields_add (fields=0x0, key=key@entry=0xb84ae448 
  uid,
 value=value@entry=0xb84a6312 1120, flags=flags@entry=(unknown: 0)) at 
  auth-fields.c:68
 field = optimized out
 idx = 3091882770
 __FUNCTION__ = auth_fields_add
  #2  0xb77bb03b in auth_request_set_userdb_field 
  (request=request@entry=0xb84b9218,
 name=0xb84ae448 uid, value=0xb84a6312 1120) at auth-request.c:1605
 uid = optimized out
 gid = optimized out
  #3  0xb77d2fb5 in userdb_template_export (tmpl=0xb84ae410,
 auth_request=auth_request@entry=0xb84b9218) at userdb-template.c:83
 
 Fixed: http://hg.dovecot.org/dovecot-2.2/rev/e84555e6eb59

That works a treat. Thanks, Timo.


signature.asc
Description: Digital signature


[Dovecot] Segfault in auth (when talked to by postfix lda)

2014-04-25 Thread Darac Marjal
Afternoon all.

I'm seeing a segfault in dovecot 2.2.12 (debian package 1:2.2.12-2). I
can log into dovecot fine with mutt, but the segfaults seem to occur
when postfix (2.11.0, debian package 2.11.0-1+b1) tries to deliver a
message.

This was working fine under 2.2.9 (I can downgrade to that and delivery works).

Can anyone help? Doveconf -n, and backtrace follow.


--
--8-- doveconf -n --
# 2.2.12: /etc/dovecot/dovecot.conf
# OS: Linux 3.12-1-686-pae i686 Debian jessie/sid xfs
auth_debug = yes
auth_mechanisms = digest-md5 cram-md5 plain
info_log_path = /var/log/dovecot.info
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot.log
log_timestamp = %Y-%m-%d %H:%M:%S 
login_log_format_elements = service=%s user=%u session=%{session} method=%m 
rip=%r lip=%l mpid=%e %c %k
mail_access_groups = mail users
mail_location = mdbox:/var/mail/%u/Mail
mail_max_userip_connections = 50
mail_plugins =  zlib stats
mail_privileged_group = mail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  driver = pam
}
passdb {
  args = /etc/dovecot/passwd
  driver = passwd-file
}
plugin {
  antispam_backend = dspam
  antispam_crm_binary = /bin/false
  antispam_debug_target = syslog
  antispam_dspam_args = --client;--mode=teft;--deliver;--user;%u
  antispam_dspam_binary = /usr/bin/dspam
  antispam_pipe_program = /usr/sbin/sendmail
  antispam_pipe_tmpdir = /tmp
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_spam_pattern_ignorecase = SPAM
  antispam_trash_pattern_ignorecase = trash;Deleted *
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  stats_refresh = 30 secs
  stats_track_cmds = yes
}
postmaster_address = postmas...@darac.org.uk
protocols =  imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0666
  }
}
service lmtp {
  inet_listener lmtp {
address = 192.168.123.254
port = 20024
  }
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0666
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
}
service stats {
  fifo_listener stats-mail {
mode = 0600
user = vmail
  }
}
ssl_cert = /etc/dovecot/mail.www.ssl-bundle.crt
ssl_key = /etc/dovecot/private/mail.www.ssl.key
userdb {
  driver = passwd
}
userdb {
  args = uid=vmail gid=vmail home=/var/mail/%u
  driver = static
}
protocol lmtp {
  mail_fsync = optimized
  mail_plugins =  zlib sieve
}
protocol lda {
  mail_fsync = optimized
  mail_plugins =  zlib sieve
}
protocol imap {
  mail_plugins =  zlib zlib imap_zlib antispam stats imap_stats
}

8 backtrace ---

Core was generated by `dovecot/auth'.
Program terminated with signal 11, Segmentation fault.
#0  auth_fields_find_idx (fields=fields@entry=0x0, key=key@entry=0xb84ae448 
uid,
idx_r=idx_r@entry=0xbfc07d0c) at auth-fields.c:44
44  auth-fields.c: No such file or directory.
(gdb) bt full
#0  auth_fields_find_idx (fields=fields@entry=0x0, key=key@entry=0xb84ae448 
uid,
idx_r=idx_r@entry=0xbfc07d0c) at auth-fields.c:44
i = optimized out
count = optimized out
#1  0xb77bed33 in auth_fields_add (fields=0x0, key=key@entry=0xb84ae448 uid,
value=value@entry=0xb84a6312 1120, flags=flags@entry=(unknown: 0)) at 
auth-fields.c:68
field = optimized out
idx = 3091882770
__FUNCTION__ = auth_fields_add
#2  0xb77bb03b in auth_request_set_userdb_field 
(request=request@entry=0xb84b9218,
name=0xb84ae448 uid, value=0xb84a6312 1120) at auth-request.c:1605
uid = optimized out
gid = optimized out
#3  0xb77d2fb5 in userdb_template_export (tmpl=0xb84ae410,
auth_request=auth_request@entry=0xb84b9218) at userdb-template.c:83
table = 0xb84a6110
str = 0xb84a5ff0
value = optimized out
i = 0
count = 6
__FUNCTION__ = userdb_template_export
#4  0xb77d230a in static_lookup_real 
(auth_request=auth_request@entry=0xb84b9218,
callback=0xb77ba9b0 auth_request_userdb_callback) at userdb-static.c:32
_module = optimized out
module = optimized out
#5  0xb77d23ae in static_credentials_callback (result=PASSDB_RESULT_OK,
credentials=0xb84b5bb7 Mananozu, size=8, auth_request=0xb84b9218) at 
userdb-static.c:52
ctx 

Re: [Dovecot] Public Namespace and INBOX

2014-03-06 Thread Darac Marjal
On Thu, Mar 06, 2014 at 11:49:07AM +0100, Dieter Knopf wrote:
 Hello,
 
 i added a existing MAILDIR as a Public Namespace and i can subscribe to
 this Namespace without a problem.
 
 I can access every folder except the INBOX. Thunderbird just shows a GREY
 INBOX.

This is a symptom of a folder not existing, but folders beneath it
existing. For example, I filter Debian Bug mails into
INBOX\Bugs\$BugNumber. There is no INBOX\Bugs folder, so it shows up
greyed.

If you have a greyed out INBOX, then either you've made a mistake in
your config or perhaps there's an issue with the mailbox itself. Can you
access the maildir as a private namespace?

 
 Is there any way to access the INBOX of a maildir?
 
 Thanks
 Dieter Knopf


signature.asc
Description: Digital signature


Re: [Dovecot] Dovecot security

2013-08-14 Thread Darac Marjal
On Wed, Aug 14, 2013 at 06:12:02AM +, Jay Khashan wrote:
 Hi,
 
 THIS IS URGENT 
 
 I have Debian Linux machine which I installed as a mail server with postfix, 
 and dovecot. my mail server is setup to use SMTP relay. I currently have 
 ports 143, 995, 25  SSMTP ports open. in the last few days I have been under 
 attack where email is being sent to fake email address for example 
 x...@evg-mail.org which does not exist in the mysql db. 
 
  I need to figure out and lock down dovecot, because I believe the attack is 
 some kind of virus /spyware. I need to know what statement in dovecot.conf or 
 main.cf (postfix) I can modify to lock it down. Also open to install software 
 to combat this kind of attack. Let me know what configuration files, info do 
 you need to help out

I think it's probably going to be more effective to lock down postfix
(http://www.postfix.org/ADDRESS_VERIFICATION_README.html) than it is to
lock down dovecot
(http://wiki2.dovecot.org/Authentication/RestrictAccess).

I think, if you want to accept the mail but then refuse to store it,
you're looking at things from the wrong angle.



signature.asc
Description: Digital signature


Re: [Dovecot] Case-insensitive detail mailboxes?

2013-07-26 Thread Darac Marjal
On Thu, Jul 25, 2013 at 11:29:56AM -0500, /dev/rob0 wrote:
 We're using sieve with LMTP. We want to have lda_mailbox_autocreate 
 and lmtp_save_to_detail_mailbox. Is there a way to make the detail 
 case-insensitive? If so I have not found it yet.
 
 I suppose we could lowercase the input string for the SQL userdb 
 query, but that's not what is wanted. The idea being that if a user 
 makes a mailbox called Test is that user+t...@example.com and 
 user+t...@example.com should both go to that Test mailbox. If it 
 was lowercased, a mailbox called Test would be ignored and test 
 used.
 
 With autocreate, this could be a problem if mail is delivered to 
 autocreated case-sensitive mailboxes that the user won't see.
 
 Hmmm, maybe a global sieve script?

I use the following sieve snippet rather than
lmtp_save_to_detail_mailbox:

  if envelope :detail :regex to (.+) {
  set :upperfirst :lower detail ${1};
  fileinto :create Tagged/${detail};
  stop;
  }

So, if the detail portion of the TO address exists, set a variable
detail to be the first-letter-uppercased version of that portion (test
- Test, TEST - Test and so on) and file the message into Tagged/Test,
creating that if necessary.


signature.asc
Description: Digital signature


Re: [Dovecot] http://xi.rename-it.nl down?

2012-09-21 Thread Darac Marjal
On Fri, Sep 21, 2012 at 03:22:03PM +0200, Reindl Harald wrote:
 
 
 Am 21.09.2012 15:09, schrieb Matthias:
  Hello!
  
  Could it be, that http://xi.rename-it.nl is down?
 
 not from vienna
 
 but what the hell has this question to search
 on the dovecot-list?
 

The mentioned site is a host for Prebuilt Binaries:
http://wiki2.dovecot.org/PrebuiltBinaries


signature.asc
Description: Digital signature


Re: [Dovecot] POP3S PORT

2012-09-14 Thread Darac Marjal
On Fri, Sep 14, 2012 at 01:37:31PM +0300, Robert JR wrote:
  
 
 Hello 
 
 I am using dovecot with POP3S and IMAPS ports, 
 
 When client
 connect to POP3S port (995) , i can see in dovecot log file that the
 protocol is TLSv1 
 
 So how come the protocol is TLSv1 and not SSL ?

First of all, read http://wiki2.dovecot.org/SSL and see if that answers
your question.



signature.asc
Description: Digital signature


Re: [Dovecot] IMAP Label Updates not showing up across shared account

2011-06-09 Thread Darac Marjal
On Wed, Jun 08, 2011 at 06:22:52PM +0200, Markus Schönhaber wrote:
 08.06.2011 14:59, Timo Sirainen:
 
  Well, this was an interesting message. multipart/alternative where first
  part was text and second part a GIF image.
 
 To me, it seems the second part is not a GIF but rather a
 multipart/related which, in turn, contains the GIF as first (and only)
 part. Maybe that's what confuses some clients.

According to http://en.wikipedia.org/wiki/MIME#Alternative, the parts of
a multipart/alternative are supposed to be ordered by increasing
faithfulness. Typically, this means plain text followed by HTML or rich
text. In this case, the mime structure is implying that the
multipart/related bundle is a truer representation than the plain text.

This also explains why mutt doesn't miss a beat with these messages. It
can't display the GIF, so the next best option is the plain text :)


-- 
Paul Saunders