Re: Sieve generate a lot of hard link copies of mails in mailboxes

2024-06-14 Thread George Asenov via dovecot

Christian,

Could you please post your configuration + sieve script for reporting to 
rspamd?


I was thinking that hitting this limit is consequence of millions of 
hard links and not the reason!


But I will try that.

On 14-Jun-24 11:50 AM, Christian Kivalo via dovecot wrote:




What is the size of the system memory on your dovecot server?  And
what is the size of the dovecot.index.cache file when you see this
error?  You should be able to delete the index and recreate it using
doveadm.


Servers are with enough RAM the smallest one is 64GB. The memory I'm referring is 
"vsz_limit=256 MB" and in my opinion it is not the issue but a consequence of 
the large amount of links in the mail and from there large index file and the result not 
enough memory to work with.

Try increasing the vsz_limit to 512m or even 1g. This can very well be (part 
of) the problem.
I have set default_vsz_limit = 1g and don't run into problems with imap_sieve 
calling the rspamd script to learn ham/spam.



--
Warm regards
George A.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Sieve generate a lot of hard link copies of mails in mailboxes

2024-06-14 Thread George Asenov via dovecot


Hi John,

Thanks for taking your time looking at my issue.

On 13-Jun-24 3:42 PM, John Stoffel via dovecot wrote:

"George" == George Asenov via dovecot  writes:


I don't have a real suggestion, but I do think you can clarify your problem.


No one have idea what is wrong here?
On 07-Jun-24 4:10 PM, George Asenov via dovecot wrote:

Hello,

I have very strange issue. Sieve generate copies of users messages i.e.
not real copies but hardlinks for the same message. It happens to many
messages but not every message and not every time, it is not a single
user issue I have couple users with that issue.


Are you expecting sieve to generate copies?  And are the copies in the
same folder or across folders?  I.e. do you find an email in the
INBOX, and a hardlink in the SPAM folder?


The goal here is when user move messages around imap folders to report 
them as ham/spam depending on where they originate and where they go.
I think Sieve should send copy of the message to Rspamd because 
otherwise client will see the message dispensary which is not intuitive.



Copies are all in the same folder. same message with many hard links 
placed in the same folder. Mostly happen in Trash and Spam folders.




What are the sizes of these emails?  Are they all large?  Or have
attachements?  Is there anything that's common amongst those emails?
Nothing in common as far as I can see. Sizes are verry different mostly 
small.



One idea might be to setup a test account and to just send it a bunch
of emails to try and make the problem occur.  And to also look closely
at the rspamd logs as well.


Already done that but I'm unable to reproduce it.


What is the size of the system memory on your dovecot server?  And
what is the size of the dovecot.index.cache file when you see this
error?  You should be able to delete the index and recreate it using
doveadm.

Servers are with enough RAM the smallest one is 64GB. The memory I'm 
referring is "vsz_limit=256 MB" and in my opinion it is not the issue 
but a consequence of the large amount of links in the mail and from 
there large index file and the result not enough memory to work with.

When I delete all the copies the "Out of memory" errors are gone.


But from the sound of it, you have users with many thousands of emails
in a folder or folders.  Can you check to see if there's any
relationship between users with larger numbers of hardlinks and those
with large numbers of emails?


There are users with large number of mails but only some of them have 
this issue and some don't. Also there are users with small amount that 
have it which make them with large number of mails(copies).



And maybe instead of having sieve call rspam, maybe you can put it
into a milter and just have the



Rspamd is on a different server and it is set as a milter in postfix.
That is why I use curl to report spam/ham.


It happens during auto reporting for spam/ham with sieve.
But I'm unable to reproduce it.

At some point the hardlinks copies become so many that the mailbox index
files become so bug that dovecot start throwing error:

dovecot[3385911]: imap(redac...@domain.tld)<1992901>:
Error: Mailbox Junk: mmap(size=520636784) failed with file
/var/lib/dovecot-virtualmin/index/redac...@domain.tld/.Junk/dovecot.index.cache:
 Cannot allocate memory

other relevant logs are:

dovecot: imap-login: Login: user=, method=PLAIN,
rip=YYY.YYY.YYY.YYY, lip=XXX.XXX.XXX.XXX, mpid=3393763, TLS,
session=
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG:
learn-spam.sieve was triggered on imap.cause=COPY:
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG:
learn-spam on imap.cause=COPY: from=redacted.mail, to=redacted2.mail,
subject=Asseyez-vous confortablement, n'importe où...,
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>,
X-Spamd-Result=default: False [4.49 / 15.00];
FORGED_RECIPIENTS(2.00)[m:redacted2.mail,s:redacted.user.fr];
BAYES_SPAM(1.89)[88.30%]; MID_RHS_NOT_FQDN(0.50)[];
BAD_REP_POLICIES(0.10)[]; RCVD_NO_TLS_LAST(0.10)[];
MIME_GOOD(-0.10)[multipart/related,multipart/alternative,text/plain];
ASN(0.00)[asn:34300, ipnet:62.173.128.0/19, country:RU];
RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~,5:+];
RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[]; GREYLIST(0.00)[pass,body];
R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];
R_SPF_ALLOW(0.00)[+mx]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[or.mg];
NEURAL_SPAM(0.00)[0.000]
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG:
learn-spam send to rspamd spam
dovecot: imap(redacted.user)<3393763>: program
exec:/var/lib/dovecot/sieve/rspamd-learn-spam.sh (3397238): Terminated
with non-zero exit code 1
dovecot: imap(redacted.user)<3393763>: Error: siev

Re: Sieve generate a lot of hard link copies of mails in mailboxes

2024-06-12 Thread George Asenov via dovecot

No one have idea what is wrong here?

On 07-Jun-24 4:10 PM, George Asenov via dovecot wrote:

Hello,

I have very strange issue. Sieve generate copies of users messages i.e. 
not real copies but hardlinks for the same message. It happens to many 
messages but not every message and not every time, it is not a single 
user issue I have couple users with that issue.


It happens during auto reporting for spam/ham with sieve.
But I'm unable to reproduce it.

At some point the hardlinks copies become so many that the mailbox index 
files become so bug that dovecot start throwing error:


dovecot[3385911]: imap(redac...@domain.tld)<1992901>: 
Error: Mailbox Junk: mmap(size=520636784) failed with file 
/var/lib/dovecot-virtualmin/index/redac...@domain.tld/.Junk/dovecot.index.cache: Cannot allocate memory


other relevant logs are:

dovecot: imap-login: Login: user=, method=PLAIN, 
rip=YYY.YYY.YYY.YYY, lip=XXX.XXX.XXX.XXX, mpid=3393763, TLS, 
session=
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam.sieve was triggered on imap.cause=COPY: 
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam on imap.cause=COPY: from=redacted.mail, to=redacted2.mail, 
subject=Asseyez-vous confortablement, n'importe où..., 
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>, 
X-Spamd-Result=default: False [4.49 / 15.00]; 
FORGED_RECIPIENTS(2.00)[m:redacted2.mail,s:redacted.user.fr]; 
BAYES_SPAM(1.89)[88.30%]; MID_RHS_NOT_FQDN(0.50)[]; 
BAD_REP_POLICIES(0.10)[]; RCVD_NO_TLS_LAST(0.10)[]; 
MIME_GOOD(-0.10)[multipart/related,multipart/alternative,text/plain]; 
ASN(0.00)[asn:34300, ipnet:62.173.128.0/19, country:RU]; 
RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~,5:+]; 
RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; 
RCVD_VIA_SMTP_AUTH(0.00)[]; GREYLIST(0.00)[pass,body]; 
R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; 
R_SPF_ALLOW(0.00)[+mx]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[or.mg]; 
NEURAL_SPAM(0.00)[0.000]
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam send to rspamd spam
dovecot: imap(redacted.user)<3393763>: program 
exec:/var/lib/dovecot/sieve/rspamd-learn-spam.sh (3397238): Terminated 
with non-zero exit code 1
dovecot: imap(redacted.user)<3393763>: Error: sieve: 
failed to execute to program `rspamd-learn-spam.sh': refer to server log 
for more information. [2024-06-03 07:36:40]
dovecot: imap(redacted.user)<3393763>: Disconnected: 
Connection closed (UID FETCH finished 32.173 secs ago) in=2914 out=39237 
deleted=1 expunged=1 trashed=0 hdr_count=14 hdr_bytes=10705 body_count=1 
body_bytes=1606


I know that this is because the mail which is reported is too big for 
curl but documentation say that

$
pipe :copy :try "rspamd-learn-spam.sh";
$
this should ignore the error.
I have tested also to change it like that:
$
pipe :copy  "rspamd-learn-spam.sh";
$
but the issue still persists

I can't confirm that the issue is that error because these errors are 
way less than the messages with hardlink copies.

Also sometimes one mail have more than two hardlinks to it.

here is a example:

inode# hardlink_count filename
2430090371 23850 
./Maildir/.Trash/cur/1714190559.M355157P25776.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190562.M259778P25902.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190565.M188090P26028.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190568.M340582P26179.redacted.hostname,S=39259,W=40217:2,S


yes this is "23850" hardlinks to the same Inode
###
The issue is somewhere in the sieve ham/spam reporting to rspamd but 
cant figure out where and why.


Is this a bug or my configuration is wrong?


Here are all related configurations (feel free to ask for more if needed):
##
# doveconf -n
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 4.18.0-513.24.1.el8_9.x86_64 x86_64 Rocky Linux release 8.9 
(Green Obsidian)

# Hostname: redacteddomain.tld
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 1000
mail_location = 
maildir:~/Maildir:INDEX=/var/lib/dovecot-virtualmin/index/%u:CONTROL=/var/lib/dovecot-virtualmin/control/%u

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 extractt

Sieve generate a lot of hard link copies of mails in mailboxes

2024-06-07 Thread George Asenov via dovecot
ot;];


# Exclude messages which were moved to Trash (or training mailboxes) 
from ham learning

if environment :matches "imap.mailbox" "*" {
set "mailbox" "${1}";
}
if string "${mailbox}" [ "INBOX/Trash", "INBOX/Deleted Items", 
"INBOX/Bin", "INBOX/train_ham", "INBOX/train_prob", "INBOX/train_spam", 
"Trash" ] {

stop;
}

# Logging
if address :matches "from" "*" { set "FROM" "${1}"; }
if address :matches "to" "*" { set "TO" "${1}"; }
if header :matches "subject" "*" { set "SUBJECT" "${1}"; }
if header :matches "Message-ID" "*" { set "MSGID" "${1}"; }
if header :matches "X-Spamd-Result" "*" { set "XSpamdResult" "${1}"; }
if environment :matches "imap.cause" "*" { set "IMAPCAUSE" "${1}"; }
debug_log "learn-ham on imap.cause=${IMAPCAUSE}: from=${FROM}, to=${TO}, 
subject=${SUBJECT}, msgid=${MSGID}, X-Spamd-Result=${XSpamdResult}";


# Ham-learning sending a copy of the message to rspamd
debug_log "learn-ham send to rspamd ham";
pipe :copy :try "rspamd-learn-ham.sh";
##

cat /var/lib/dovecot/sieve/rspamd-learn-ham.sh
#!/bin/bash

function log_error() { echo `date '+%Y-%m-%d %H:%M:%S'` ERROR: $1 >&2; }
function log() { echo `date '+%Y-%m-%d %H:%M:%S'` INFO: $1; }

MAIL=$(tee)
SERVER_LIST=("redacted.tld") #rspamd server

PASSWORD="redacted"


for SERVER in ${SERVER_LIST[@]}; do
log "Trying to report spam to ${SERVER}"
RETURN=$(/usr/bin/curl -s --connect-timeout 1 -H "Password: 
${PASSWORD}" --data-binary --url "http://${SERVER}:11334/learnham"; -d 
"${MAIL}")

STATUS=$?
if [ $STATUS -eq 0 ]; then
log "Spam reported to ${SERVER}: ${RETURN}"
exit 0
else
if [ $STATUS -eq 28 ]; then
log_error "Reporting SPAM to ${SERVER} failed: Connection 
timed out."

else
log_error "Reporting SPAM to ${SERVER} failed: CURL exit 
status ${STATUS}"

fi
fi
done

log_error "Reporting SPAM failed ${SERVERS[@]}"
exit 1
##

 cat /var/lib/dovecot/sieve/rspamd-learn-spam.sh
#!/bin/bash

function log_error() { echo `date '+%Y-%m-%d %H:%M:%S'` ERROR: $1 >&2; }
function log() { echo `date '+%Y-%m-%d %H:%M:%S'` INFO: $1; }

MAIL=$(tee)
SERVER_LIST=("redacted.tld") #rspamd server
PASSWORD="redacted"



for SERVER in ${SERVER_LIST[@]}; do
log "Trying to report spam to ${SERVER}"
RETURN=$(/usr/bin/curl -s --connect-timeout 1 -H "Password: 
${PASSWORD}" --data-binary --url "http://${SERVER}:11334/learnspam"; -d 
"${MAIL}")

STATUS=$?
if [ $STATUS -eq 0 ]; then
log "Spam reported to ${SERVER}: ${RETURN}"
exit 0
else
if [ $STATUS -eq 28 ]; then
log_error "Reporting SPAM to ${SERVER} failed: Connection 
timed out."

else
log_error "Reporting SPAM to ${SERVER} failed: CURL exit 
status ${STATUS}"

fi
fi
done

log_error "Reporting SPAM failed ${SERVERS[@]}"
exit 1
##

without all "imapsieve_mailbox.* " directives the problem is gone.


Thanks to everyone in advance.

--
Warm regards
George A.
WPXHosting
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Namespace configuration for archive in different storage

2024-05-06 Thread George Kontostanos via dovecot
hostname = ganimede-dev-rm.secer.it
> >mail_plugins = " notify replication sieve quota"
> > }
> > protocol imap {
> >mail_plugins = " notify replication zlib"
> > }
> > protocol sieve {
> >mail_max_userip_connections = 10
> >managesieve_implementation_string = Dovecot Pigeonhole
> >managesieve_logout_format = bytes=%i/%o
> >managesieve_max_compile_errors = 5
> >managesieve_max_line_length = 64 k
> > }
> > protocol pop3 {
> >mail_plugins = " notify replication zlib"
> > }
> >
> > On 10/04/24 14:47, Daniele Rinaldi via dovecot wrote:
> >   Hello,
> >   i made this namespace configuration inside "10-mail.conf":
> >
> >   namespace Archives {
> >   type = private
> >   disabled = no
> >   hidden = no
> >   list = yes
> >   ignore_on_failure = no
> >   inbox = no
> >   location =maildir:/mnt/archive-mail-storage/%n/Maildir
> >   prefix = "Archive."
> >   subscriptions = yes
> >   separator = .
> >
> >   I need to set up the storage for archive on a different storage than
> >   the inbox is located.
> >   Thunderbird, now seems that can see the subfolders inside the archive
> >   that start with dot but cannot access the "cur" folder where inbox
> >   mail are stored.
> >
> >   Can you help me?
> >   ___
> >   dovecot mailing list --dovecot@dovecot.org
> >   To unsubscribe send an email todovecot-le...@dovecot.org
> > --
> > Daniele Rinaldi
> > Junior System Administrator
> > [Trust_Italia_S.p.A.]
> >
> > [https://www.trustitalia.it/immagini/
> > DigiCertSymantecWebsiteSecurity_LockupLogo_H.png]
> >
> > Via Po, 22 - 00198 Roma
> > tel.: +39 06332287238
> > fax: +39 063336145
> > e-mail:drina...@trustitalia.it
> > website:www.trustitalia.it
> > br=""> Le modalità di trattamento dei dati a cui è stato dato il consenso e 
> > le
> > relative finalità sono consultabili al link.
> > Qualora non desiderasse ricevere le nostre comunicazioni, potrà comunicarlo
> > mediante il seguente link.
> > Inoltre, in ogni momento, potrà modificare o cancellare i dati presenti nel
> > nostro archivio contattandoci all'indirizzopriv...@trustitalia.it
> >
> > [Se possibile non stamparmi!] Se possibile, non stamparmi!
> >
> > ___
> > dovecot mailing list --dovecot@dovecot.org
> > To unsubscribe send an email todovecot-le...@dovecot.org
> --
>
> *Daniele Rinaldi
> Junior System Administrator*
>
> Trust Italia S.p.A. <https://www.trustitalia.it/>
>
>
>
> Via Po, 22 - 00198 Roma
> *tel.: +39 06332287238*
> *fax: +39 063336145*
> *e-mail: * drina...@trustitalia.it <mailto:drina...@trustitalia.it>
> *website: * www.trustitalia.it <https://www.trustitalia.it>
>
> Le modalità di trattamento dei dati a cui è stato dato il consenso e le
> relative finalità sono consultabili al link
> <https://www.trustitalia.it/archivio/legal_agreements/informativa_privacy_email_marketing.pdf>.
> Qualora non desiderasse ricevere le nostre comunicazioni, potrà
> comunicarlo mediante il seguente link
> <https://www.trustitalia.it/site/info_css/05110101/revoca-del-consenso>.
> Inoltre, in ogni momento, potrà modificare o cancellare i dati presenti
> nel nostro archivio contattandoci all'indirizzo priv...@trustitalia.it
> <mailto:priv...@trustitalia.it>
>
> Se possibile non stamparmi! Se possibile, non stamparmi!
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org



-- 
George Kontostanos
---
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


imap and lmtp create different index/control folders

2023-01-05 Thread George Asenov

Hello,

We have migrated our mail server from procmail lda to dovecot lmtp/sieve .

dovecot imap create the dir with the email account
t...@s32.teststring.ml for name but lmtp create it as
test-s32.someteststring...@serverhostname.tld

I can't figure out how to manipulate nor what username postfix send to 
dovecot/lmtp or how dovecot/lmtp interpret it.
As you will see in the config below there is a separate userdb set for 
lmtp because it receive the username/envelope from postfix as 
test-s32.someteststring...@serverhostname.tld which prevent it to use 
the pam authentication to verify and use the mail user to deliver email. 
So I use driver = passwd-file which have the option to configure the 
format of the username. But this is kind of dirty hack which i do not like.


Anyone now how to configure dovecot/lmtp by default to remove the 
@myserverhostname.tld from the username or configure postfix not to add it?



Here is the postfix config:
#
 postconf
2bounce_notice_recipient = postmaster
access_map_defer_code = 450
access_map_reject_code = 554
address_verify_cache_cleanup_interval = 12h
address_verify_default_transport = $default_transport
address_verify_local_transport = $local_transport
address_verify_map = btree:$data_directory/verify_cache
address_verify_negative_cache = yes
address_verify_negative_expire_time = 3d
address_verify_negative_refresh_time = 3h
address_verify_pending_request_limit = 5000
address_verify_poll_count = ${stress?{1}:{3}}
address_verify_poll_delay = 3s
address_verify_positive_expire_time = 31d
address_verify_positive_refresh_time = 7d
address_verify_relay_transport = $relay_transport
address_verify_relayhost = $relayhost
address_verify_sender = $double_bounce_sender
address_verify_sender_dependent_default_transport_maps = 
$sender_dependent_default_transport_maps
address_verify_sender_dependent_relayhost_maps = 
$sender_dependent_relayhost_maps

address_verify_sender_ttl = 0s
address_verify_service_name = verify
address_verify_transport_maps = $transport_maps
address_verify_virtual_transport = $virtual_transport
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_mail_to_commands = alias, forward
allow_mail_to_files = alias, forward
allow_min_user = no
allow_percent_hack = no
allow_untrusted_routing = no
alternate_config_directories =
always_add_missing_headers = no
always_bcc =
anvil_rate_time_unit = 60s
anvil_status_update_time = 600s
append_at_myorigin = yes
append_dot_mydomain = ${{$compatibility_level} < {1} ? {yes} : {no}}
application_event_drain_time = 100s
authorized_flush_users = static:anyone
authorized_mailq_users = static:anyone
authorized_submit_users = static:anyone
backwards_bounce_logfile_compatibility = yes
berkeley_db_create_buffer_size = 16777216
berkeley_db_read_buffer_size = 131072
best_mx_transport =
biff = yes
body_checks =
body_checks_size_limit = 51200
bounce_notice_recipient = postmaster
bounce_queue_lifetime = 5d
bounce_service_name = bounce
bounce_size_limit = 5
bounce_template_file =
broken_sasl_auth_clients = yes
canonical_classes = envelope_sender, envelope_recipient, header_sender, 
header_recipient

canonical_maps =
cleanup_service_name = cleanup
command_directory = /usr/sbin
command_execution_directory =
command_expansion_filter = 
1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

command_time_limit = 1000s
compatibility_level = 2
config_directory = /etc/postfix
confirm_delay_cleared = no
connection_cache_protocol_timeout = 5s
connection_cache_service_name = scache
connection_cache_status_update_time = 600s
connection_cache_ttl_limit = 2s
content_filter =
cyrus_sasl_config_path =
daemon_directory = /usr/libexec/postfix
daemon_table_open_error_is_fatal = no
daemon_timeout = 18000s
data_directory = /var/lib/postfix
debug_peer_level = 2
debug_peer_list =
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd 
$daemon_directory/$process_name $process_id & sleep 5

default_database_type = hash
default_delivery_slot_cost = 5
default_delivery_slot_discount = 50
default_delivery_slot_loan = 3
default_delivery_status_filter =
default_destination_concurrency_failed_cohort_limit = 1
default_destination_concurrency_limit = 20
default_destination_concurrency_negative_feedback = 1
default_destination_concurrency_positive_feedback = 1
default_destination_rate_delay = 0s
default_destination_recipient_limit = 50
default_extra_recipient_limit = 1000
default_filter_nexthop =
default_minimum_delivery_slots = 3
default_privs = nobody
default_process_limit = 100
default_rbl_reply = $rbl_code Service unavailable; $rbl_class 
[$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}

default_recipient_limit = 2
default_recipient_refill_delay = 5s
default_recipient_refill_limit = 100
default_transport = smtp
default_transport_rate_delay = 0s
default_verp_delimiters = +=
defer_code = 450
defer_service_name = defer
defer_transports =
delay_logging_resolution_limit 

lmtp userdb can't resolve users

2022-10-21 Thread George Asenov

Hello,

I use postfix with dovecot as an lmtp LDA with unix users and multiple 
domain names and mailboxes in Maildir format placed in domain directory 
like:


/home/mainuser/homes/u...@domain.tld/Maildir
or
/home/mainuser/domains/domain2.tld/homes/u...@domain2.tld/Maildir

which have the main user as a group and u...@domain.tld/u...@domain2.tld 
as owner


Postfix have
virtual_alias_maps = hash:/etc/postfix/virtual

there in virtual file there is  map like:

u...@domain.tld user-dom...@domain.tld

and in /etc/passwd

there are actually 2 users with the same home dir and
same UID/GID (only the username is different)


and in postfix
mailbox_transport = lmtp:unix:private/dovecot-lmtp

The issue is that when postfix passes the email for local delivery to 
dovecot lmtp it sends the username as user-domain@serverhostname.tld 
but dovecot is configured with

!include auth-system.conf.ext

can't resolve this username thus fails to deliver.

I've found a workaround in the net to use custom userdb just for lmtp
like this:


protocol lmtp {
  mail_plugins = $mail_plugins sieve
userdb {

driver = passwd-file
args = username_format=%n /etc/passwd
  }
}

which works but produce some warnings because there is the root user (ID 
0) and actually is a dirty workaround


Is there more elegant solution??


Re: Dovecot mail-crypt webmail can't read encrypted messages

2022-10-10 Thread George Asenov
Dovecot is opensource so you can download source edit the log format 
removing the passwords and compile it.


On 09-Oct-22 8:47 PM, Serveria Support wrote:
Like I've already mentioned in my reply to Aki, I generally agree, but 
many of these methods require much time and expertise some bad guys 
don't have. You can also bruteforce the passwords but it can take years. 
With passwords showing in logs all they need to do is make a few clicks 
and enable auth logging. In most cases the attacker is really short on 
time and needs to act fast, before he is detected and locked out of the 
system.


On 2022-10-09 19:10, Bernardo Reino wrote:

On Sun, 9 Oct 2022, Serveria Support wrote:

So this means passwords cannot be masked/hidden in the logs? You 
realize that it actually defeats the whole idea of encrypted storage? 
It's useless. I can think of lots of scenarios: malicious system 
administrator reading users mails and blackmailing them or selling 
their business secrets to competitors, corrupt law enforcement in 
some countries getting rid of political or business opponents by 
disclosing the contents of their mails and I can go on and on and 
on... There is no such thing as semi-privacy. Privacy is either there 
or it's not.


If your attack scenario includes somebody owning your server, nothing
prevents them from compiling/installing a custom version of dovecot
(or any other tool you may be using, like PAM, etc.) which dumps the
passwords in clear text to a suitable file, pipe, or socket.

So good luck with that requirement..

Cheers,
Bernardo




--
Warm regards
George A.
WPXHosting


Re: Call procmail after sieve

2022-09-01 Thread George Asenov

Basically I need to achieve the behavior described here:
https://www.concordia.ca/ginacody/aits/support/faq/procmail_and_sieve.html
Could someone explain in details how to ?

On 01-Sep-22 12:54 PM, George Asenov wrote:
You are right, after configuration now procmail is started and piped the 
message.

Unfortunately some loop happen after starting procmail
=
  sieve: Started running script 
`/var/lib/dovecot/sieve_after/procmail.svbin'
  sieve: Finished running script `ok' 
(status=/var/lib/dovecot/sieve_after/procmail.svbin, resource usage: no 
usage recorded)

  sieve: multi-script: Execute result
  sieve: msgid=<20220901093826.065f3...@servername.com>: Executing 
result (status=ok, commit=no)
  sieve: msgid=<20220901093826.065f3...@servername.com>: Starting 
execution of actions

  sieve: msgid=<20220901093826.065f3...@servername.com>: Executing actions
  sieve: msgid=<20220901093826.065f3...@servername.com>: Executing pipe 
action

  sieve: action pipe: running program: procmail
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Created
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: 
USER=t...@uk7.teststring567.tk
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: 
HOME=/home/uk7/homes/test
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: 
HOST=servername.com
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: 
RECIPIENT=t...@uk7.teststring567.tk
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: 
ORIG_RECIPIENT=t...@uk7.teststring567.tk
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
executing pipe action (status=ok, keep=canceled)
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
executing actions (status=ok, keep=none)
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
executing result (no commit, status=ok, keep=no)

  sieve: multi-script: Sequence ended
  sieve: multi-script: Finishing sequence (status=ok)
  sieve: msgid=<20220901093826.065f3...@servername.com>: Executing 
result (status=ok, commit=yes)
  sieve: msgid=<20220901093826.065f3...@servername.com>: Starting 
execution of actions

  sieve: msgid=<20220901093826.065f3...@servername.com>: Executing actions
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
executing actions (status=ok, keep=none)

  sieve: msgid=<20220901093826.065f3...@servername.com>: Finalizing actions
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finalize pipe 
action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes)

  sieve: msgid=<20220901093826.065f3...@servername.com>: Commit pipe action
  program exec:/var/lib/dovecot/sieve-pipe/procmail: Establishing 
connection

  program exec:/var/lib/dovecot/sieve-pipe/procmail: Forked child process
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Connected 
to program
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished 
streaming payload to program
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished 
input to program

  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Disconnected
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Waiting 
for program to finish after 0 msecs (timeout = 1 msecs)

  procmail[152746]: Error while writing to "/var/log/procmail.log"
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Child 
process ended

  program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Destroy
  dovecot[152745]: 
lda(t...@uk7.teststring567.tk)<152745>: sieve: 
msgid=<20220901093826.065f3...@servername.com>: pipe action: piped 
message to program `procmail'
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
finalizing actions (status=ok, keep=none)

  sieve: msgid=<20220901093826.065f3...@servername.com>: Finishing actions
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finish pipe action
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
executing result (final, status=ok, keep=no)

  sieve: multi-script: Sequence finished (status=ok, keep=no)
  sieve: multi-script: Destroy
  auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0): 
Disconnected: Connection closed (fd=25)
  program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Child 
process ended

  program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Destroy
  dovecot[152743]: 
lda(t...@uk7.teststring567.tk)<152743><0nIfDZJ9EGOnVAIAsVjU+A>: sieve: 
msgid=<20220901093826.065f3...@servername.com>: pipe action: piped 
message to program `procmail'
  sieve: msgid=<20220901093826.065f3...@servername.com>: Finished 
finalizing actions (status=ok, keep=none)

  sieve: msgid=<20220901093826.065f3...

Re: Call procmail after sieve

2022-09-01 Thread George Asenov
 (status=ok, keep=no)
 sieve: multi-script: Destroy
 auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0): 
Disconnected: Connection closed (fd=24)
 program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Child 
process ended

 program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Destroy


On 31-Aug-22 10:58 PM, Stephan Bosch wrote:



On 31-8-2022 17:20, Christian Mack wrote:

Hello

You need to activate vnd.dovecot.pipe extention in dovecots sieve.

And you need to configure it; i.e. specify where the scripts can be found.



Kind regards,
Christian Mack

Am 31.08.22 um 15:13 schrieb George Asenov:

Thanks that was the reason for the permissions error. Unfortunately the
next error comes that isn't explanatory:

##
  Starting execution of actions
  Executing actions
  Executing pipe action
  Debug: sieve: action pipe: running program: procmail
  Error: sieve: action pipe: failed to execute program `procmail':
vnd.dovecot.pipe extension is unconfigured
  Finished executing pipe action (status=ok, keep=canceled)
  Finished executing actions (status=ok, keep=none)
  Finished executing result (no commit, status=ok, keep=no)
  Debug: sieve: multi-script: Sequence ended
  Debug: sieve: multi-script: Finishing sequence (status=ok)
  Executing result (status=ok, commit=yes)
  Starting execution of actions
  Executing actions
  Finished executing actions (status=ok, keep=none)
  Finalizing actions
  Finalize pipe action (status=ok, action_status=ok, commit_status=ok,
pre-commit=yes)
  Commit pipe action
  Error: sieve: failed to pipe message to program `procmail': refer to
server log for more information. [2022-08-31 13:58:54]
  Finished finalizing actions (status=failure, keep=none)
  Finalize implicit keep (failure=yes)
  Execute implicit keep (failure=yes)
  Start storing into mailbox INBOX
  Executing implicit keep action
  Execute storing into mailbox 'INBOX'
  Saving to mailbox 'INBOX' successful so far
  Finished executing implicit keep action (status=ok)
  Finalize implicit keep action(status=ok, action_status=ok,
commit_status=ok)
  Commit implicit keep action
  Commit storing into mailbox 'INBOX'
  stored mail into mailbox 'INBOX'
  Finish implicit keep action
  Finishing actions
  Finish pipe action
  Finished executing result (final, status=failure, keep=no)
  Debug: sieve: multi-script: Sequence finished (status=failure, 
keep=no)

  Debug: sieve: multi-script: Destroy
  Error: sieve: Execution of script
/var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep
was successful
##

On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail 
though...


Aki


On 31/08/2022 14:14 EEST George Asenov  wrote:

   [root@uk7 ~]# stat /usr/bin/procmail
 File: /usr/bin/procmail
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (   12/
mail)


[root@uk7 ~]# stat /usr/bin/
 File: /usr/bin/
Access: (0555/dr-xr-xr-x)  Uid: (    0/    root)   Gid: (    0/
root)


[root@uk7 ~]# stat /usr
 File: /usr
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/
root)


For me it seems that everything with the permissions is ok. Others 
also

can execute it?

Other suggestions?
Is the config correct?

I forgot to mention
# dovecot --version
2.3.16 (7e2e900c1a)
On
# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)

On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:

Hi all!

On 31/08/2022 11:40, George Asenov wrote:
[...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>: 
Fatal:
execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission 
denied
That looks like a permission problem - no x Bits set on the 
executable

and/or directories to it (for the dovecot user)?

Kind regards,
   Bernd

--
Warm regards
George A.
WPXHosting






--
Warm regards
George A.
WPXHosting


Re: Call procmail after sieve

2022-08-31 Thread George Asenov
Thanks that was the reason for the permissions error. Unfortunately the 
next error comes that isn't explanatory:


##
 Starting execution of actions
 Executing actions
 Executing pipe action
 Debug: sieve: action pipe: running program: procmail
 Error: sieve: action pipe: failed to execute program `procmail': 
vnd.dovecot.pipe extension is unconfigured

 Finished executing pipe action (status=ok, keep=canceled)
 Finished executing actions (status=ok, keep=none)
 Finished executing result (no commit, status=ok, keep=no)
 Debug: sieve: multi-script: Sequence ended
 Debug: sieve: multi-script: Finishing sequence (status=ok)
 Executing result (status=ok, commit=yes)
 Starting execution of actions
 Executing actions
 Finished executing actions (status=ok, keep=none)
 Finalizing actions
 Finalize pipe action (status=ok, action_status=ok, commit_status=ok, 
pre-commit=yes)

 Commit pipe action
 Error: sieve: failed to pipe message to program `procmail': refer to 
server log for more information. [2022-08-31 13:58:54]

 Finished finalizing actions (status=failure, keep=none)
 Finalize implicit keep (failure=yes)
 Execute implicit keep (failure=yes)
 Start storing into mailbox INBOX
 Executing implicit keep action
 Execute storing into mailbox 'INBOX'
 Saving to mailbox 'INBOX' successful so far
 Finished executing implicit keep action (status=ok)
 Finalize implicit keep action(status=ok, action_status=ok, 
commit_status=ok)

 Commit implicit keep action
 Commit storing into mailbox 'INBOX'
 stored mail into mailbox 'INBOX'
 Finish implicit keep action
 Finishing actions
 Finish pipe action
 Finished executing result (final, status=failure, keep=no)
 Debug: sieve: multi-script: Sequence finished (status=failure, keep=no)
 Debug: sieve: multi-script: Destroy
 Error: sieve: Execution of script 
/var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep 
was successful

##

On 31-Aug-22 2:27 PM, Aki Tuomi wrote:

You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...

Aki


On 31/08/2022 14:14 EEST George Asenov  wrote:

  
[root@uk7 ~]# stat /usr/bin/procmail

File: /usr/bin/procmail
Access: (0755/-rwxr-xr-x)  Uid: (0/root)   Gid: (   12/mail)

[root@uk7 ~]# stat /usr/bin/
File: /usr/bin/
Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/root)

[root@uk7 ~]# stat /usr
File: /usr
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/root)

For me it seems that everything with the permissions is ok. Others also
can execute it?

Other suggestions?
Is the config correct?

I forgot to mention
# dovecot --version
2.3.16 (7e2e900c1a)
On
# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)

On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:

Hi all!

On 31/08/2022 11:40, George Asenov wrote:
[...]> Aug 30 15:22:26 uk7 dovecot[112153]:

lda(test-uk7.teststring567.tk)<112151>: Fatal:
execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied


That looks like a permission problem - no x Bits set on the executable
and/or directories to it (for the dovecot user)?

Kind regards,
  Bernd


--
Warm regards
George A.
WPXHosting




--
Warm regards
George A.
WPXHosting


Re: Call procmail after sieve

2022-08-31 Thread George Asenov

[root@uk7 ~]# stat /usr/bin/procmail
  File: /usr/bin/procmail
Access: (0755/-rwxr-xr-x)  Uid: (0/root)   Gid: (   12/mail)

[root@uk7 ~]# stat /usr/bin/
  File: /usr/bin/
Access: (0555/dr-xr-xr-x)  Uid: (0/root)   Gid: (0/root)

[root@uk7 ~]# stat /usr
  File: /usr
Access: (0755/drwxr-xr-x)  Uid: (0/root)   Gid: (0/root)

For me it seems that everything with the permissions is ok. Others also 
can execute it?


Other suggestions?
Is the config correct?

I forgot to mention
# dovecot --version
2.3.16 (7e2e900c1a)
On
# cat /etc/redhat-release
Rocky Linux release 8.6 (Green Obsidian)

On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:

Hi all!

On 31/08/2022 11:40, George Asenov wrote:
[...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>: Fatal: 
execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied


That looks like a permission problem - no x Bits set on the executable
and/or directories to it (for the dovecot user)?

Kind regards,
 Bernd


--
Warm regards
George A.
WPXHosting


Call procmail after sieve

2022-08-31 Thread George Asenov

Hello,

I'm trying to achieve the following scenario with dovecot + sieve + 
procmail.


Dovecot is set as LDA in postfix (if this makes any difference)
I need to set sieve that after it has executed all it's scripts 
(including before, ~/.sieve etc) and if keep is in still in effect to 
call procmail to also execute the custom user filters and then return 
(if it is not forwarded elsewhere or some) to dovecot for normal delivery.


If you ask this I need this for backward compatibility. I now use 
procmail for local delivery,spam/virus filtering,  and users have set a 
lot of custom filters/redirects.


mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

 I want to migrate to dovecot as lda and sieve for filtering but to 
keep procmail working for a while.


I have tried to follow (partially) this guide 
https://www.enricozini.org/blog/2022/debian/migrating-from-procmail-to-sieve/ 
but procmail fails to execute


##
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail: Establishing connection
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail: Forked child process
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Connected to 
program
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Finished 
streaming payload to program
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Finished 
input to program
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Disconnected
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Waiting for 
program to finish after 0 msecs (timeout = 1 msecs)
Aug 30 15:22:26 uk7 dovecot[112153]: 
lda(test-uk7.teststring567.tk)<112151>: Fatal: 
execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Child 
process ended
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: program 
exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Terminated with 
non-zero exit code 75
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Debug: 
program exec:/var/lib/dovecot/sieve-pipe/procmail (112153): Destroy
Aug 30 15:22:26 uk7 dovecot[112151]: 
lda(test-uk7.teststring567.tk)<112151>: Error: 
sieve: failed to execute to program `procmail': refer to server log for 
more information. [2022-08-30 15:22:26]

###
i couldn't find the logs referred

here some relative (on my opinion) configs:

#/etc/dovecot/conf.d/90-sieve.conf
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_plugins = sieve_extprograms
  sieve_extensions = +vnd.dovecot.pipe
  sieve_pipe_bin_dir = /var/lib/dovecot/sieve-pipe
  sieve_after = /var/lib/dovecot/sieve_after
  sieve_trace_dir = ~/.sieve-trace
  sieve_trace_level = matching
  sieve_trace_debug = yes
}

#/var/lib/dovecot/sieve-pipe/procmail

#!/bin/sh
exec /usr/bin/procmail
#
#/var/lib/dovecot/sieve_after/procmail.sieve
require "vnd.dovecot.pipe";

pipe "procmail";
#

#cat /etc/procmailrc

SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail"
SENDMAILFLAGS="-oi -t""
LOGFILE="/var/log/procmail.log"
# fully define here so user .procmailrc can use it too
DELIVER="/usr/libexec/dovecot/deliver -d $LOGNAME"
# fallback:
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"

# deliver spam to spam folder
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam

# uncomment next line to support user .procmailrc files
INCLUDERC=$HOME/.procmailrc

# deliver to INBOX and stop
:0 w
| $DELIVER
#

Thank you in advance


Re: backup v rsync

2021-05-27 Thread George Papas

Sorry for late reply  imapsync is a great tool  for migrating accounts


On 5/22/21 11:28 PM, Jeff Abrahamson wrote:
I've been migrating from a dovecot 2.2.22 instance to a dovecot 
2.3.7.2 instance.
(Said differently, from an ubuntu 16.04 host to a 20.04 host.) It's a 
tiny site:
only a handful of users actually had to migrate, most either died on 
the old one

or were born on the new one.  The main user in need of migration was me.

After fiddling with dsync and not getting it working, I threw in the 
towel.  This
is a migration I had to do once for precisely one user.  I had been 
using the old
host exclusively, so it was easy to shut down both dovecot instances 
the time it
took me to rsync my data from one to the other.  Now that seems to 
work, almost.
Mail is being delivered to my inbox, anyway.  Most other folders are 
looking

inaccessible to my mail client (thunderbird, for this test).

The main difference between the two servers, aside from the above, is 
a switch from


    mail_location = maildir:~/Maildir

to

    mail_home = /var/mail/vmail/%d/%n
    mail_location = maildir:/var/mail/vmail/%d/%n/mail:LAYOUT=fs
    mail_privileged_group = mail

I corrected permissions and ownership when I copied the data.

Now I think the problem is that LAYOUT=fs means that I should have a 
slightly different

folder hierarchy now.  The question is how best to fix this.

I have things like this

    .Archives.2020
    .Archives.2020/new
    .Archives.2020/tmp
    .Archives.2020/cur

when I think I should have things like this

    Archives
    Archives/2021
    Archives/2021/new
    Archives/2021/tmp
    Archives/2021/cur

And, again, this is one-off, so a manual fix seems most appropriate.  
I'm quite tempted
simply to shut down the dovecot instance for a minute at a quiet 
moment (mail retries...)
and rename directories as indicated above.  I only have to rename five 
directories.


Having gotten myself in a bit of a muddle on this, I thought perhaps a 
reality check that

I'm not about to make it worse would be appropriate.

Many thanks.



Re: Dovecot impatient with mysql?

2017-04-06 Thread George Kontostanos
On Thu, Apr 6, 2017 at 7:10 PM, Robert Moskowitz  wrote:
> It seems dovecot is impatient with connecting with mysql, as I see in
> maillog entries like:
>
> Apr  6 11:48:30 z9m9z dovecot: dict: Error: mysql(localhost): Connect failed
> to database (postfix): Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13) - waiting for 5 seconds before retry
> Apr  6 11:48:35 z9m9z dovecot: dict: Error: mysql(localhost): Connect failed
> to database (postfix): Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13) - waiting for 25 seconds before retry
>
> I suspect it does connect eventually.  This is a test system with only 1GB
> of memory and free reports:
>
>   totalusedfree  shared buff/cache available
> Mem:1025484  696344   24556 21528  304584  251552
> Swap:524284   92168  432116
>
>
> The production box has 2GB, so if the problem is mysql is swapping out, that
> will be 'fixed', if it is processor, well this is an ARMv7 duo core, as is
> the production box.  I am considering buying the new quad core.
>
> Is there anything I can do to get dovecot more patient with mysql, or just
> ignore there messages?
>
> thank you

I really don't understand how you reached to the conclusion that
dovecot is impatient.

-- 
George Kontostanos
---


dsync replication

2017-03-31 Thread George Dimakopoulos
Is it stable for dovecot 2.2.27 to implement DRBD (or HAST) on block level
for maildir data replication instead of using dsync plugin?

Regards,

George


Exclude namespace from replication

2017-03-01 Thread George Kontostanos
Hello list,

I am using replication with dsync and I am facing some issues with
shared folders. More particularly expunged message reappearing. I have
searched a bit and it was suggested that shared folders should not be
synced.

My namespace looks like that:

namespace {
  inbox = no
  list = children
  location = 
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
  prefix = shared/%%d/%%n/
  separator = /
  subscriptions = no
  type = shared
}

I was wondering if defining:

replication_dsync_parameters = -d -N -l 30 -U -x shared

Is enough. Or do I need to change the syntax of the namespace like that:

namespace shared {


type = shared
}

Thanks for your help


Re: Expunged message reappeared, giving a new UID

2017-03-01 Thread George Kontostanos
On Wed, Mar 1, 2017 at 3:40 PM, Γιώργος Δημακόπουλος
 wrote:
> Dovecot 2.2.27
>
> dsync-server(account_name): Warning: Maildir
> /usr/local/vhosts/mail/***/info/Sent: Expunged message reappeared,
> giving a new UID (old uid=29787, file=***)
>
> What triggers this replication for ever ??
>
> Thank you
> George

Please find also the doveconf -n

# 2.2.27 (c0f36b0): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: FreeBSD 11.0-RELEASE-p8 amd64  zfs
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2560
default_process_limit = 512
default_vsz_limit = 1 G
dict {
  acl = mysql:/usr/local/etc/dovecot/dovecot-shared-sql.conf.ext
  quota = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
log_path = /var/log/dovecot.log
mail_home = /usr/local/vhosts/mail/%d/%n
mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
mail_max_userip_connections = 70
mail_plugins = quota acl notify replication
mail_privileged_group = vmail
mail_shared_explicit_inbox = yes
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
mbox_write_locks = fcntl
namespace {
  inbox = no
  list = children
  location = 
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
  prefix = shared/%%d/%%n/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  mail_replica = tcp:mx
  quota = dict:User quota::proxy::quota
  quota_rule2 = Trash:storage=+100M
  sieve = /usr/local/vhosts/mail/%d/%n/.dovecot.sieve
  sieve_before = /usr/local/vhosts/sieve/before.d/
  sieve_dir = /usr/local/vhosts/mail/%d/%n
  sieve_global_dir = /usr/local/vhosts/sieve/%d
  sieve_global_path = /usr/local/vhosts/sieve/%d/default.sieve
}
protocols = imap lmtp sieve sieve
service aggregator {
  fifo_listener replication-notify-fifo {
mode = 0666
user = vmail
  }
  unix_listener replication-notify {
mode = 0666
user = vmail
  }
}
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-userdb {
mode = 0600
user = vmail
  }
  user = dovecot
}
service config {
  unix_listener config {
user = vmail
  }
}
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service doveadm {
  inet_listener {
port = 12345
  }
  user = vmail
}
service imap-login {
  inet_listener imap {
port = 143
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 0
  service_count = 1
  vsz_limit = 64 M
}
service replicator {
  unix_listener replicator-doveadm {
mode = 0666
  }
}
ssl_cert = 

Re: Replacement for antispam plugin

2017-02-12 Thread George Kontostanos
On Sun, Feb 12, 2017 at 8:56 PM, Stephan Bosch  wrote:
> Op 2/12/2017 om 5:36 PM schreef George Kontostanos:
>> On Sun, Feb 12, 2017 at 3:52 PM, Aki Tuomi  wrote:
>>
>>>> On February 10, 2017 at 10:06 AM Aki Tuomi  wrote:
>>>>
>>>>
>>>> Hi!
>>>> 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. Comments and suggestions are most welcome.
>>>>
>>>> https://wiki.dovecot.org/HowTo/AntispamWithSieve
>>>>
>>>> ---
>>>> Aki Tuomi
>>>> Dovecot oy
>>> Hi everyone,
>>>
>>> thank you all for your feedback, questions and comments. We have upgraded
>>> the documentation based on this, including information how to exclude Trash
>>> folder in ham script.
>>>
>>> Aki
>>>
>>
>> Thank you all very much. I am now running into a very weird issue. Whenever
>> an Junk email is “seen” I get the following error:
>>
>> Debug: sieve: vnd.dovecot.execute extension: no bin or socket directory
>> specified; extension is unconfigured (both sieve_execute_bin_dir and
>> sieve_execute_socket_dir are not set)
>> Feb 12 18:02:54 imap(user@domain): Debug: imapsieve: Static mailbox rule
>> [1]: mailbox=`Junk' from=`*' causes=(COPY) =>
>> before=`file:/usr/local/lib/dovecot/sieve/report-spam.sieve' after=(none)
>> Feb 12 18:02:54 imap(user@dmain): Debug: imapsieve: Static mailbox rule
>> [2]: mailbox=`*' from=`Junk' causes=(COPY) =>
>> before=`file:/usr/local/lib/dovecot/sieve/report-ham.sieve' after=(none)
>
> That is not an error. That is merely a debug message indicating that the
> vnd.dovecot.execute extension is unconfigured.
>
> Don't enable that extension if you're not using the "execute"
> command/test. Yes, it is in the example, but it has no function either.
> Only the vnd.dovecot.pipe extension is actually used ("pipe" command).
>
>> Also it automatically creates a .spamassassin/ folder in the user:
>>
>> -rw---  1 vmail  vmail136 Feb 10 17:33 .dovecot.lda-dupes
>> lrwx--  1 vmail  vmail 17 Mar 13  2016 .dovecot.sieve@ ->
>> managesieve.sieve
>> -rw---  1 vmail  vmail322 Feb 11 03:02 .dovecot.svbin
>> drwx--  2 vmail  vmail512 Feb 12 18:04 .spamassassin/
>> drwx--  5 vmail  vmail512 Feb 10 17:32 Drafts/
>> drwx--  5 vmail  vmail512 Feb 12 18:09 Junk/
>> drwx--  5 vmail  vmail512 Feb 11 17:36 Saved/
>> drwx--  5 vmail  vmail512 Jan 16 11:55 Sent/
>> drwx--  5 vmail  vmail512 Feb 12 18:09 Trash/
>> drwx--  2 vmail  vmail   1024 Feb 12 18:07 cur/
>> -rw---  1 vmail  vmail 21 Mar 13  2016 dovecot-acl-list
>> -rw---  1 vmail  vmail 68 Oct 17 13:19 dovecot-keywords
>> -rw---  1 vmail  vmail245 Feb 12 18:07 dovecot-uidlist
>> -rw---  1 vmail  vmail  8 Jun  9  2016 dovecot-uidvalidity
>> -r--r--r--  1 vmail  vmail  0 Mar 12  2016 dovecot-uidvalidity.56e48129
>> -rw---  1 vmail  vmail640 Feb 11 22:24 dovecot.index
>> -rw---  1 vmail  vmail  27788 Feb 12 18:07 dovecot.index.cache
>> -rw---  1 vmail  vmail  25996 Feb 12 18:07 dovecot.index.log
>> -rw---  1 vmail  vmail192 Feb 12 16:04 dovecot.mailbox.log
>> -rw---  1 vmail  vmail181 Feb 10 17:34 managesieve.sieve
>> drwx--  2 vmail  vmail512 Feb 12 17:46 new/
>> -rw---  1 vmail  vmail 39 Jun  9  2016 subscriptions
>> drwx--  2 vmail  vmail512 Feb 12 18:04 tmp/
>>
>> Any ideas ? I am attaching my config.
>
> The likely scenario is that the sa-learn tool is creating a hidden
> directory inside the $HOME directory of the user for user-specific state
> information. According to your mail_home and mail_location
> configuration, that is the same directory as the INBOX mailbox. That is
> why this may be interpreted as a mailbox by the maildir format. It is
> generally a bad idea to have those equal; you should put the mail
> location in a sub-directory of the home directory to prevent problems
> like this.
>
> https://wiki.dovecot.org/VirtualUsers/Home
>
> Regards,
>
> Stephan.
>
>
>
That makes perfect sense. I might need to find a way to migrate now to
the correct structure.

Thanks


-- 
George Kontostanos
---


Re: Replacement for antispam plugin

2017-02-12 Thread George Kontostanos
On Sun, Feb 12, 2017 at 7:52 PM, Ralph Seichter  wrote:
> On 12.02.2017 17:36, George Kontostanos wrote:
>
>> it automatically creates a .spamassassin/ folder in the user
>
> That happens because sa-learn is invoked as the user who is logged into
> IMAP. If you want all users to contribute to a global SpamAssassin
> database (like I do), you'll need to create your own learning mechanism
> instead of calling sa-learn directly.
>
> -Ralph

Actually I think that sa-learn is invoked as user vmail. But of course
I might be wrong.

sa-learn-ham.sh

LOG='/var/log/sa-learn.log'
exec /usr/local/bin/sa-learn --ham -D >> $LOG 2>&1

I had to give ownership to vmail to sa-learn.log otherwise it would
refuse to run.

Do you have any suggestions as per the way sa-learn should be executed?

Thanks for your help.

-- 
George Kontostanos
---


Re: Replacement for antispam plugin

2017-02-12 Thread George Kontostanos
On Sun, Feb 12, 2017 at 3:52 PM, Aki Tuomi  wrote:

>
> > On February 10, 2017 at 10:06 AM Aki Tuomi  wrote:
> >
> >
> > Hi!
> > 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. Comments and suggestions are most welcome.
> >
> > https://wiki.dovecot.org/HowTo/AntispamWithSieve
> >
> > ---
> > Aki Tuomi
> > Dovecot oy
>
> Hi everyone,
>
> thank you all for your feedback, questions and comments. We have upgraded
> the documentation based on this, including information how to exclude Trash
> folder in ham script.
>
> Aki
>


Thank you all very much. I am now running into a very weird issue. Whenever
an Junk email is “seen” I get the following error:

Debug: sieve: vnd.dovecot.execute extension: no bin or socket directory
specified; extension is unconfigured (both sieve_execute_bin_dir and
sieve_execute_socket_dir are not set)
Feb 12 18:02:54 imap(user@domain): Debug: imapsieve: Static mailbox rule
[1]: mailbox=`Junk' from=`*' causes=(COPY) =>
before=`file:/usr/local/lib/dovecot/sieve/report-spam.sieve' after=(none)
Feb 12 18:02:54 imap(user@dmain): Debug: imapsieve: Static mailbox rule
[2]: mailbox=`*' from=`Junk' causes=(COPY) =>
before=`file:/usr/local/lib/dovecot/sieve/report-ham.sieve' after=(none)

Also it automatically creates a .spamassassin/ folder in the user:

-rw---  1 vmail  vmail136 Feb 10 17:33 .dovecot.lda-dupes
lrwx--  1 vmail  vmail 17 Mar 13  2016 .dovecot.sieve@ ->
managesieve.sieve
-rw---  1 vmail  vmail322 Feb 11 03:02 .dovecot.svbin
drwx--  2 vmail  vmail512 Feb 12 18:04 .spamassassin/
drwx--  5 vmail  vmail512 Feb 10 17:32 Drafts/
drwx--  5 vmail  vmail512 Feb 12 18:09 Junk/
drwx--  5 vmail  vmail512 Feb 11 17:36 Saved/
drwx--  5 vmail  vmail512 Jan 16 11:55 Sent/
drwx--  5 vmail  vmail512 Feb 12 18:09 Trash/
drwx--  2 vmail  vmail   1024 Feb 12 18:07 cur/
-rw---  1 vmail  vmail 21 Mar 13  2016 dovecot-acl-list
-rw---  1 vmail  vmail 68 Oct 17 13:19 dovecot-keywords
-rw---  1 vmail  vmail245 Feb 12 18:07 dovecot-uidlist
-rw---  1 vmail  vmail  8 Jun  9  2016 dovecot-uidvalidity
-r--r--r--  1 vmail  vmail  0 Mar 12  2016 dovecot-uidvalidity.56e48129
-rw---  1 vmail  vmail640 Feb 11 22:24 dovecot.index
-rw---  1 vmail  vmail  27788 Feb 12 18:07 dovecot.index.cache
-rw---  1 vmail  vmail  25996 Feb 12 18:07 dovecot.index.log
-rw---  1 vmail  vmail192 Feb 12 16:04 dovecot.mailbox.log
-rw---  1 vmail  vmail181 Feb 10 17:34 managesieve.sieve
drwx--  2 vmail  vmail512 Feb 12 17:46 new/
-rw---  1 vmail  vmail 39 Jun  9  2016 subscriptions
drwx--  2 vmail  vmail512 Feb 12 18:04 tmp/

Any ideas ? I am attaching my config.

Thanks

# 2.2.27 (c0f36b0): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: FreeBSD 10.3-RELEASE-p11 amd64  ufs
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2560
default_process_limit = 512
dict {
  acl = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
log_path = /var/log/dovecot.log
mail_home = /usr/local/vhosts/mail/%d/%n
mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
mail_max_userip_connections = 20
mail_plugins = quota acl
mail_privileged_group = vmail
mail_shared_explicit_inbox = yes
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
mbox_write_locks = fcntl
namespace {
  inbox = no
  list = children
  location =
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
  prefix = shared/%%d/%%n/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  imapsieve_mailbox1_before =
file:/usr/local/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before =
file:/usr/local/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  quota = dict:User quota::proxy::quota
  quot

Re: Replacement for antispam plugin

2017-02-10 Thread George Kontostanos
On Fri, Feb 10, 2017 at 9:59 PM, Ralph Seichter 
wrote:

> On 10.02.17 20:34, Michael Slusarz wrote:
>
> > When you move a message to a new mailbox, that is a "new message"
> > event (a new UID in the target mailbox is created; the message count
> > increases). So imap.mailbox is set to the name of the *target* mailbox.
>
> My tests seem to indicate otherwise. Deleting a message currently
> located in the Junk folder causes the report-ham.sieve script to be
> invoked, which in my case contains the following:
>
>   require ["vnd.dovecot.pipe", "copy", "environment"];
>   if environment "imap.mailbox" "Trash" {
> stop;
>   } elsif environment "imap.mailbox" "Junk" {
> pipe :copy "debug-junk";
>   } else {
> pipe :copy "learn-ham";
>   }
>
> I can see that "learn-ham" is always invoked when a message is deleted
> from or moved out of the Junk folder, so my guess is that imap.mailbox
> is neither "Trash" nor "Junk" ("debug-junk" is never called, according
> to the Dovecot logs). Unfortunately I don't know how to debug this
> further.
>
> I don't want "learn-ham" to be run when a message located in the Junk
> folder is manually deleted or moved to Trash, and right now I don't know
> how to accomplish this.
>
> -Ralph
>

Same problem here. As a workaround I tried the following:

# From Spam folder to Inbox
  imapsieve_mailbox2_name = Inbox
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve

In theory this should trigger the  report-ham script, only if a mail is
moved from Spam to Inbox. However, it does not seem to work either.
-- 
George Kontostanos
---


Re: Replacement for antispam plugin

2017-02-10 Thread George Kontostanos
On Fri, Feb 10, 2017 at 6:25 PM, George Kontostanos 
wrote:

>
>
> On Fri, Feb 10, 2017 at 5:09 PM, Darac Marjal 
> wrote:
>
>> 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/Pigeo
>> nhole/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.
>>
>
> I think that this needs some change:
>
>  # From Spam folder to elsewhere
>   imapsieve_mailbox2_name = *
>   imapsieve_mailbox2_from = Spam
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve
>
> When a message from Spam is moved to Trash then the report-ham.sieve is
> being executed.
>
> Can we add an exception for the Trash folder?
>
> Thanks
>
>
> --
> George Kontostanos
> ---
>

Could we use something like this:

imapsieve_mailbox2_name = ! Trash

-- 
George Kontostanos
---


Re: Replacement for antispam plugin

2017-02-10 Thread George Kontostanos
On Fri, Feb 10, 2017 at 5:09 PM, Darac Marjal 
wrote:

> 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/Pigeo
> nhole/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.
>

I think that this needs some change:

 # From Spam folder to elsewhere
  imapsieve_mailbox2_name = *
  imapsieve_mailbox2_from = Spam
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve

When a message from Spam is moved to Trash then the report-ham.sieve is
being executed.

Can we add an exception for the Trash folder?

Thanks


-- 
George Kontostanos
---


Dsync migration with shared folders

2017-02-06 Thread George Dimakopoulos
Hi everyone,

We discovered that the migration path from a VPS to our 2XHP replication server 
environment with shared folders should be:

1) Rsync all domains from the VPS to serverA. Then rsync all domains from 
ServerA to ServerB. ServerA & ServerB are in a identical state.
2) Create an empty directory for the shared indexes 
3) Start dovecot on both machines.

If we did not sync both machines then dsync could not replicate the domains 
that contained shared folders.

What is the right migration process for domains with shared folders ?

Regards,
George

dovecot -n
-
# 2.2.27 (c0f36b0): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: FreeBSD 11.0-RELEASE-p2 amd64  zfs
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2560
default_process_limit = 512
dict {
acl = mysql:/usr/local/etc/dovecot/dovecot-shared-sql.conf.ext
quota = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
log_path = /var/log/dovecot.log
mail_debug = yes
mail_home = /usr/local/vhosts/mail/%d/%n
mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
mail_max_userip_connections = 70
mail_plugins = quota acl notify replication
mail_privileged_group = vmail
mail_shared_explicit_inbox = yes
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
mbox_write_locks = fcntl
namespace {
inbox = no
list = children
location = 
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
prefix = shared/%%d/%%n/
separator = /
subscriptions = no
type = shared
}
namespace inbox {
inbox = yes
list = yes
location = 
mailbox Drafts {
  auto = subscribe
  special_use = \Drafts
}
mailbox Junk {
  auto = subscribe
  special_use = \Junk
}
mailbox Sent {
  auto = subscribe
  special_use = \Sent
}
mailbox Trash {
  auto = subscribe
  special_use = \Trash
}
prefix = 
separator = /
type = private
}
passdb {
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
acl = vfile
acl_shared_dict = proxy::acl
mail_replica = tcp:mx1
quota = dict:User quota::proxy::quota
quota_rule2 = Trash:storage=+100M
sieve = /usr/local/vhosts/mail/%d/%n/.dovecot.sieve
sieve_before = /usr/local/vhosts/sieve/before.d/
sieve_dir = /usr/local/vhosts/mail/%d/%n
sieve_global_dir = /usr/local/vhosts/sieve/%d
sieve_global_path = /usr/local/vhosts/sieve/%d/default.sieve
}
protocols = imap lmtp sieve sieve
service aggregator {
fifo_listener replication-notify-fifo {
  mode = 0666
  user = vmail
}
unix_listener replication-notify {
  mode = 0666
  user = vmail
}
}
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
  group = postfix
  mode = 0666
  user = postfix
}
unix_listener auth-userdb {
  mode = 0600
  user = vmail
}
user = dovecot
}
service config {
unix_listener config {
  user = vmail
}
}
service dict {
unix_listener dict {
  mode = 0600
  user = vmail
}
}
service doveadm {
inet_listener {
  port = 12345
}
user = vmail
}
service imap-login {
inet_listener imap {
  port = 143
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
  group = postfix
  mode = 0600
  user = postfix
}
}
service managesieve-login {
inet_listener sieve {
  port = 4190
}
process_min_avail = 0
service_count = 1
vsz_limit = 64 M
}
service replicator {
unix_listener replicator-doveadm {
  mode = 0666
}
}
userdb {
args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
protocol lmtp {
mail_plugins = quota acl notify replication sieve
}
protocol lda {
mail_plugins = quota acl notify replication sieve acl
postmaster_address = root
}
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
mail_plugins = quota acl notify replication imap_quota imap_acl
}
ssl_cert =
ssl_key =

Dsync migration with shared folders

2017-02-06 Thread George Dimakopoulos
Hi everyone,

We discovered that the migration path from a VPS to our 2XHP replication server 
environment with shared folders should be:

1) Rsync all domains from the VPS to serverA. Then rsync all domains from 
ServerA to ServerB. ServerA & ServerB are in a identical state.
2) Create an empty directory for the shared indexes 
3) Start dovecot on both machines.

If we did not sync both machines then dsync could not replicate the domains 
that contained shared folders.

What is the right migration process for domains with shared folders ?

Regards,
George

dovecot -n
-
# 2.2.27 (c0f36b0): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: FreeBSD 11.0-RELEASE-p2 amd64  zfs
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2560
default_process_limit = 512
dict {
 acl = mysql:/usr/local/etc/dovecot/dovecot-shared-sql.conf.ext
 quota = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
log_path = /var/log/dovecot.log
mail_debug = yes
mail_home = /usr/local/vhosts/mail/%d/%n
mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
mail_max_userip_connections = 70
mail_plugins = quota acl notify replication
mail_privileged_group = vmail
mail_shared_explicit_inbox = yes
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
mbox_write_locks = fcntl
namespace {
 inbox = no
 list = children
 location = 
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
 prefix = shared/%%d/%%n/
 separator = /
 subscriptions = no
 type = shared
}
namespace inbox {
 inbox = yes
 list = yes
 location = 
 mailbox Drafts {
   auto = subscribe
   special_use = \Drafts
 }
 mailbox Junk {
   auto = subscribe
   special_use = \Junk
 }
 mailbox Sent {
   auto = subscribe
   special_use = \Sent
 }
 mailbox Trash {
   auto = subscribe
   special_use = \Trash
 }
 prefix = 
 separator = /
 type = private
}
passdb {
 args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
 driver = sql
}
plugin {
 acl = vfile
 acl_shared_dict = proxy::acl
 mail_replica = tcp:mx1
 quota = dict:User quota::proxy::quota
 quota_rule2 = Trash:storage=+100M
 sieve = /usr/local/vhosts/mail/%d/%n/.dovecot.sieve
 sieve_before = /usr/local/vhosts/sieve/before.d/
 sieve_dir = /usr/local/vhosts/mail/%d/%n
 sieve_global_dir = /usr/local/vhosts/sieve/%d
 sieve_global_path = /usr/local/vhosts/sieve/%d/default.sieve
}
protocols = imap lmtp sieve sieve
service aggregator {
 fifo_listener replication-notify-fifo {
   mode = 0666
   user = vmail
 }
 unix_listener replication-notify {
   mode = 0666
   user = vmail
 }
}
service auth-worker {
 user = vmail
}
service auth {
 unix_listener /var/spool/postfix/private/auth {
   group = postfix
   mode = 0666
   user = postfix
 }
 unix_listener auth-userdb {
   mode = 0600
   user = vmail
 }
 user = dovecot
}
service config {
 unix_listener config {
   user = vmail
 }
}
service dict {
 unix_listener dict {
   mode = 0600
   user = vmail
 }
}
service doveadm {
 inet_listener {
   port = 12345
 }
 user = vmail
}
service imap-login {
 inet_listener imap {
   port = 143
 }
}
service lmtp {
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0600
   user = postfix
 }
}
service managesieve-login {
 inet_listener sieve {
   port = 4190
 }
 process_min_avail = 0
 service_count = 1
 vsz_limit = 64 M
}
service replicator {
 unix_listener replicator-doveadm {
   mode = 0666
 }
}
userdb {
 args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
 driver = sql
}
protocol lmtp {
 mail_plugins = quota acl notify replication sieve
}
protocol lda {
 mail_plugins = quota acl notify replication sieve acl
 postmaster_address = root
}
protocol imap {
 imap_client_workarounds = tb-extra-mailbox-sep
 mail_plugins = quota acl notify replication imap_quota imap_acl
}
ssl_cert =
ssl_key =

Re: Domains on different IPs

2016-12-23 Thread George Kontostanos
On Sat, Dec 17, 2016 at 1:35 PM, Mark Constable  wrote:

> I want to supply separate Letsencrypt certificates for each virtual domain
> and seeing that SNI does not work I need to allocate separate IPs. Could
> anyone give some pointers, or keywords to search for, on...
>
> a) how to make dovecot listen for different domains on different IPs?
>
> b) how to configure separate SSL certs for each of these IPs?
>

The way we do it is by specifying each IP address and certificate in
10-ssl.conf

ssl = yes

local xxx.xxx.xxx.xxx { # instead of IP you can also use hostname, which
will be resolved

  protocol imap {

ssl_cert = 

Re: dsync replication quota2 issue

2016-10-12 Thread George Kontostanos
On Tue, Oct 11, 2016 at 2:31 PM, George Kontostanos 
wrote:

> Hello list,
>
> We are testing a configuration with 2 mail servers using dsync replication
> (dovecot 2.2.25 ). Everything works fine except the quota2 which is
> calculated wrong only on one server. Quota2 resides on  different databases
> since each server needs to update it.
>
> The problem: The local server always updates quota2 twice on each message
> it receives. This happens only on one server. Updates run fine on the
> second.
>
> SQL Debug:
>
>  Query UPDATE quota2 SET bytes=bytes+2108,messages=messages+1 WHERE
> username = 'u...@domain.org'
>  Query UPDATE quota2 SET bytes=bytes+2108,messages=messages+1 WHERE
> username = 'u...@domain.org'
>
> The result  on the server that runs fine
>
> mysql> select * from quota2;
> ++-+--+
> | username   | bytes   | messages |
> ++-+--+
> |
> | u...@domain.org | 2917126 |   17 |
>
> The result on  the server that has the problem:
>
> mysql> select * from quota2;
> ++-+--+
> | username   | bytes   | messages |
> ++-+--+
> |
> | u...@domain.org | 2920317 |   19 |
>
> dovecot -n is the same on both:
>
> root@mx2:/var/log # dovecot -n
> # 2.2.25 (7be1766): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.15 (97b3da0)
> # OS: FreeBSD 10.3-RELEASE amd64  ufs
> auth_mechanisms = plain login
> auth_verbose = yes
> default_client_limit = 2560
> default_process_limit = 512
> dict {
>   acl = mysql:/usr/local/etc/dovecot/dovecot-dict-shares-sql.conf.ext
>   quota = mysql:/usr/local/etc/dovecot/dovecot-dict-quota-sql.conf.ext
> }
> doveadm_password =  # hidden, use -P to show it
> doveadm_port = 12345
> log_path = /var/log/dovecot.log
> mail_debug = yes
> mail_home = /usr/local/vhosts/mail/%d/%n
> mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
> mail_max_userip_connections = 70
> mail_plugins = quota acl notify replication
> mail_privileged_group = vmail
> mail_shared_explicit_inbox = yes
> 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
> mbox_write_locks = fcntl
> namespace {
>   inbox = no
>   list = children
>   location = maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/
> usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/
> local/vhosts/indexes/%d/%n/shared/%%u
>   prefix = shared/%%d/%%n/
>   separator = /
>   subscriptions = no
>   type = shared
> }
> namespace inbox {
>   inbox = yes
>   list = yes
>   location =
>   mailbox Drafts {
> auto = subscribe
> special_use = \Drafts
>   }
>   mailbox Junk {
> auto = subscribe
> special_use = \Junk
>   }
>   mailbox Sent {
> auto = subscribe
> special_use = \Sent
>   }
>   mailbox Trash {
> auto = subscribe
> special_use = \Trash
>   }
>   prefix =
>   separator = /
>   type = private
> }
> passdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> plugin {
>   acl = vfile
>   acl_shared_dict = proxy::acl
>   mail_replica = tcp:beta.sophimail.com:12345
>   quota = dict:User quota::proxy::quota
>   quota_rule2 = Trash:storage=+100M
>   sieve = /usr/local/vhosts/mail/%d/%n/.dovecot.sieve
>   sieve_before = /usr/local/vhosts/sieve/before.d/
>   sieve_dir = /usr/local/vhosts/mail/%d/%n
>   sieve_global_dir = /usr/local/vhosts/sieve/%d
>   sieve_global_path = /usr/local/vhosts/sieve/%d/default.sieve
> }
> protocols = imap lmtp sieve sieve
> service aggregator {
>   fifo_listener replication-notify-fifo {
> mode = 0666
> user = vmail
>   }
>   unix_listener replication-notify {
> mode = 0666
> user = vmail
>   }
> }
> service auth-worker {
>   user = vmail
> }
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> group = postfix
> mode = 0666
> user = postfix
>   }
>   unix_listener auth-userdb {
> mode = 0600
> user = vmail
>   }
>   user = dovecot
> }
> service config {
>   unix_listener config {
> user = vmail
>   }
> }
> service dict {
>   unix_listener dict {
> mode = 0600
> user = vmail
>   }
> }
> service doveadm {
>   inet_listener {

dsync replication quota2 issue

2016-10-11 Thread George Kontostanos
Hello list,

We are testing a configuration with 2 mail servers using dsync replication
(dovecot 2.2.25 ). Everything works fine except the quota2 which is
calculated wrong only on one server. Quota2 resides on  different databases
since each server needs to update it.

The problem: The local server always updates quota2 twice on each message
it receives. This happens only on one server. Updates run fine on the
second.

SQL Debug:

 Query UPDATE quota2 SET bytes=bytes+2108,messages=messages+1 WHERE
username = 'u...@domain.org'
 Query UPDATE quota2 SET bytes=bytes+2108,messages=messages+1 WHERE
username = 'u...@domain.org'

The result  on the server that runs fine

mysql> select * from quota2;
++-+--+
| username   | bytes   | messages |
++-+--+
|
| u...@domain.org | 2917126 |   17 |

The result on  the server that has the problem:

mysql> select * from quota2;
++-+--+
| username   | bytes   | messages |
++-+--+
|
| u...@domain.org | 2920317 |   19 |

dovecot -n is the same on both:

root@mx2:/var/log # dovecot -n
# 2.2.25 (7be1766): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.15 (97b3da0)
# OS: FreeBSD 10.3-RELEASE amd64  ufs
auth_mechanisms = plain login
auth_verbose = yes
default_client_limit = 2560
default_process_limit = 512
dict {
  acl = mysql:/usr/local/etc/dovecot/dovecot-dict-shares-sql.conf.ext
  quota = mysql:/usr/local/etc/dovecot/dovecot-dict-quota-sql.conf.ext
}
doveadm_password =  # hidden, use -P to show it
doveadm_port = 12345
log_path = /var/log/dovecot.log
mail_debug = yes
mail_home = /usr/local/vhosts/mail/%d/%n
mail_location = maildir:/usr/local/vhosts/mail/%d/%n:LAYOUT=fs
mail_max_userip_connections = 70
mail_plugins = quota acl notify replication
mail_privileged_group = vmail
mail_shared_explicit_inbox = yes
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
mbox_write_locks = fcntl
namespace {
  inbox = no
  list = children
  location =
maildir:/usr/local/vhosts/mail/%%d/%%n:LAYOUT=fs:INDEX=/usr/local/vhosts/indexes/%d/%n/shared/%%u:INDEXPVT=/usr/local/vhosts/indexes/%d/%n/shared/%%u
  prefix = shared/%%d/%%n/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  mail_replica = tcp:beta.sophimail.com:12345
  quota = dict:User quota::proxy::quota
  quota_rule2 = Trash:storage=+100M
  sieve = /usr/local/vhosts/mail/%d/%n/.dovecot.sieve
  sieve_before = /usr/local/vhosts/sieve/before.d/
  sieve_dir = /usr/local/vhosts/mail/%d/%n
  sieve_global_dir = /usr/local/vhosts/sieve/%d
  sieve_global_path = /usr/local/vhosts/sieve/%d/default.sieve
}
protocols = imap lmtp sieve sieve
service aggregator {
  fifo_listener replication-notify-fifo {
mode = 0666
user = vmail
  }
  unix_listener replication-notify {
mode = 0666
user = vmail
  }
}
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-userdb {
mode = 0600
user = vmail
  }
  user = dovecot
}
service config {
  unix_listener config {
user = vmail
  }
}
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service doveadm {
  inet_listener {
port = 12345
  }
  user = vmail
}
service imap-login {
  inet_listener imap {
port = 143
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 0
  service_count = 1
  vsz_limit = 64 M
}
service replicator {
  unix_listener replicator-doveadm {
mode = 0666
  }
}
ssl_cert = 

POP3 strange logging behavior after upgrade from 2.2.13 to 2.2.25

2016-08-17 Thread George Dankin

Hello,

I experience exactly the same issue.

Is there any progress regarding that bug report?

Cheers

George Dankin
Forum Leader
HardwareBG.com


dovecot-proxy with managesieve, director and backend dovecot imap

2015-05-06 Thread George Vieira

hi all,

I've been tasked to add sieve/managesieve to an existing dovecot cluster 
running 2.1.7 on debian wheezy which is made up of 2 dovecot-proxy hosts 
as directors and some back end dovecot imap hosts all running the same 
version.


My problem is that I thought to put the service on the director/proxy 
hosts since they wouldn't have too much load on it, but when I do I get 
the following error:


Apr 28 11:00:28 master: Info: Dovecot v2.1.7 starting up (core dumps 
disabled)
Apr 28 11:00:28 config: Warning: service auth { client_limit=5 } is 
lower than required under max. load (6)
Apr 28 11:00:34 managesieve-login: Error: proxy: host not given: 
user=, method=PLAIN, rip=192.168.100.207, 
lip=192.168.100.119, TLS, session=<3/zPY74UOgDAqGTP>
Apr 28 11:00:34 managesieve-login: Info: Aborted login (internal 
failure, 1 succesful auths): user=, 
method=PLAIN, rip=192.168.100.207, lip=192.168.100.119, TLS, 
session=<3/zPY74UOgDAqGTP>


From searching around, only ever saw 1 result which was to add 
"executable =  managesieve-login director" to the managesieve service, 
but this made no difference at all and the error is the same.


So I tried to instead use the back end imap servers, but they throw 
errors expecting the users password to be the common proxy/director 
password as below:

passdb {
   driver = static
   args = user=%u password=crypticpasswordagain
}

Apr 28 12:03:37 auth: Debug: 
static(mailchan...@mydomain.net,192.168.100.207,<17RTRb8UpADAqGTP>): lookup
Apr 28 12:03:37 auth: Info: 
static(mailchan...@mydomain.net,192.168.100.207,<17RTRb8UpADAqGTP>): 
Password mismatch
Apr 28 12:03:37 auth: Debug: 
static(mailchan...@mydomain.net,192.168.100.207,<17RTRb8UpADAqGTP>): 
PLAIN(85387v92394jks) != 'crypticpasswordagain'
Apr 28 12:03:39 auth: Debug: client out: FAIL   1 
user=mailchan...@mydomain.net


So with configs below, how is it best to run managesieve that takes the 
correct login/password without directing to the cluster (or direct if 
it's easier but must use real user password)?


-- dovecot proxy config --

# dovecot version 2.1.7

instance_name= dovecot-proxy
protocols= imap pop3 lmtp sieve
mail_location= maildir:~/
#listen= 192.168.101.119
listen= 0.0.0.0
#= dovecot-proxy-1
director_servers= 192.168.101.119
#= dovecot-shared-7
director_mail_servers= 192.168.100.101
base_dir= /var/run/dovecot-proxy
login_greeting= Welcome to IMAP.
default_internal_user= webmail

lmtp_proxy = yes

disable_plaintext_auth = no

auth_mechanisms = plain login cram-md5

auth_verbose=yes
auth_debug=yes
auth_debug_passwords=yes
mail_debug=yes
verbose_ssl=yes
auth_verbose_passwords=no

#log_path = syslog
log_path = /var/log/dovecot.log

default_process_limit = 1
default_client_limit = 5

ssl = no
ssl_cert = 

Re: Conditional SASL authentication

2015-02-24 Thread George Sexton

The things that occur to me are

1) Ensure that the sender domain is authorized by doing a rule in 
main.cf for send_restrictions. Then at least they won't be sending 
things with faked from=.


2) Do some work with rate limiting.

http://steam.io/2013/04/01/postfix-rate-limiting/

3) Look at something like fail2ban.





On 2/24/2015 10:28 AM, Luciano Mannucci wrote:

Hello,

I have a few users that are often hit by a trojan virus that steals
e-mail user and password. Having a very little (if not null) power on
their machines, I need to be able to block the outgoing mail wich is
handled by postfix via dovecot SASL.
Blocking it at dovecot level would be optimal, for the virus doesn't
necessarily use the e-mail of the user as its from, just the user and
password for the authentication phase.

Is it feasible?

AdvThanksAnce,

Luciano.


--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: dovecot.index.log in Maildir/cur

2015-02-05 Thread George Sexton


On 2/5/2015 9:01 AM, Steffen Kaiser wrote:


Could you delete those files and immediatly send a message to that 
user and check, if the files re-appear?




It's pretty random if they do or don't. Sometimes a few minutes later 
they popup. Sometimes a whole day will pass and then they appear.


--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: dovecot.index.log in Maildir/cur

2015-02-05 Thread George Sexton


On 2/5/2015 12:56 AM, Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 4 Feb 2015, George Sexton wrote:

I'm seeing two bogus messages appearing my Maildir/cur directory. 
They're dovecot.index.log and dovecot-uidlist.


-rw--- 1 gsexton users  51 Feb  4 09:04 
Maildir/cur/dovecot-uidlist:2,S
-rw--- 1 gsexton users 244 Feb  4 09:04 
Maildir/cur/dovecot.index.log


These files are only appearing in the Maildir/cur directory, and not 
in any other directory that mail is delivered to (e.g. mail list 
directories).


does the files re-appear if you delete them?


Yes, but not immediately, and not every time. It "seems" like after you 
delete them an hour or so passes.





I'm using the current version of Mozilla Thunderbird as my mail client.

Mail is delivered to Maildir/ by procmail.


Do you call Dovecot LDA from procmail?


No.



I was originally using Courier, but changed to dovecot. I did run the 
conversion program on all the mail boxes.


Maybe, they are left over from this process? Those two files belong 
into ~/Maildir and not ~/Maildir/cur



mail_location = maildir:~/Maildir




The issue is they keep re-appearing. Other users have reported this as well.


--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


dovecot.index.log in Maildir/cur

2015-02-04 Thread George Sexton
I'm seeing two bogus messages appearing my Maildir/cur directory. 
They're dovecot.index.log and dovecot-uidlist.


-rw--- 1 gsexton users  51 Feb  4 09:04 Maildir/cur/dovecot-uidlist:2,S
-rw--- 1 gsexton users 244 Feb  4 09:04 Maildir/cur/dovecot.index.log

These files are only appearing in the Maildir/cur directory, and not in 
any other directory that mail is delivered to (e.g. mail list directories).


I'm using the current version of Mozilla Thunderbird as my mail client.

Mail is delivered to Maildir/ by procmail.

I was originally using Courier, but changed to dovecot. I did run the 
conversion program on all the mail boxes.


Other than these

If anyone could help me understand what I'm doing wrong, I'd appreciate 
it. I've researched the mail list and read the wiki articles, but I'm 
just not seeing anything that looks helpful.


Here's my config info:

# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.7-7-default x86_64 openSUSE 13.2 (x86_64) -> File System: btrfs

mail_location = maildir:~/Maildir
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 = INBOX.
  separator = .
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap
service imap-login {
  inet_listener imaps {
port = 993
ssl = yes
  }
}
ssl = required
ssl_cert = http://www.mhsoftware.com


Re: [Dovecot] Disable PAM username change?

2013-08-28 Thread George
Ok, I figured it out.

I used the dovecot_delivery transport with Exim. When using the "-d
$local_part" option, it does the same userdb lookup that Dovecot itself
does later, so the mail gets delivered and is fetched to the right location.

Hope this helps.

Best regards.


On Sat, Aug 24, 2013 at 4:52 AM, George  wrote:

> Hi! I have a problem involving Samba4, exim4, fetchmail, Dovecot and PAM...
> I am using Dovecot 2.1.7 on Debian Wheezy.
>
> I have setup a "maildrop" machine, which fetches mail from an external
> POP3 server for multiple accounts using fetchmail, delivers to local users
> mailboxes through exim4 and then serves them on the intranet via IMAP with
> Dovecot.
> This works great with local unix users, but I am having some trouble to
> configure it to work with Samba4 AD users (Samba 4.0.9 running as a DC on
> the same machine).
>
> Basically, I have configured PAM with winbind and it works fine (AD users
> can SSH the machine for example). Dovecot also authenticates properly via
> PAM, but the problem is that the username gets changed in the process (PAM
> returrns the "username" as "DOMAIN\username"):
>
> Aug 21 22:50:22 dc2 dovecot: auth-worker(5179): Debug:
> auth(foo,127.0.0.1): username changed foo -> DOMAIN\foo
> Aug 21 22:50:22 dc2 dovecot: auth: Debug:
> auth(foo,127.0.0.1,<0bBfg3/kpQB/AAAB>): username changed foo -> DOMAIN\foo
>  Aug 21 22:50:22 dc2 dovecot: auth: Debug: client out:
> OK#0111#011user=DOMAIN\foo
>
> So the actual problem is that exim4 is delivering the mail to, for
> example, "/var/mail/foo" but Dovecot is looking for the mailbox on
> "/var/mail/DOMAIN\foo", even if the username given in the IMAP session is
> just "foo". The wiki 
> mentions<http://wiki2.dovecot.org/PasswordDatabase/PAM>that "a PAM module can 
> change the username". Can this be avoided?
>
> I need either:
> * Exim to deliver the mail to the user mailbox, *including* the domain
> part (out of scope of this list, but information is welcome), or
> * Dovecot to fetch the mail *not* using the domain part as part of the
> username variable.
>
> As a quick and dirty workaround, I hardcoded the domain part in the exim
> delivery path (something like "/var/mail/DOMAIN\\$local_part"), but this is
> far from optimal since I cannot use both unix users and AD users, I cannot
> use dovecot_delivery LDA transport, etc.
>
> As a bottom line, I also posted this to the Samba list because I believe
> this could also be solved if winbind just always returned the username
> without the domain when queried (conf option not working, probable bug)
>
> Ideas are welcome!!
>
> Best regards,
>
> Jorge
>


[Dovecot] Disable PAM username change?

2013-08-24 Thread George
Hi! I have a problem involving Samba4, exim4, fetchmail, Dovecot and PAM...
I am using Dovecot 2.1.7 on Debian Wheezy.

I have setup a "maildrop" machine, which fetches mail from an external POP3
server for multiple accounts using fetchmail, delivers to local users
mailboxes through exim4 and then serves them on the intranet via IMAP with
Dovecot.
This works great with local unix users, but I am having some trouble to
configure it to work with Samba4 AD users (Samba 4.0.9 running as a DC on
the same machine).

Basically, I have configured PAM with winbind and it works fine (AD users
can SSH the machine for example). Dovecot also authenticates properly via
PAM, but the problem is that the username gets changed in the process (PAM
returrns the "username" as "DOMAIN\username"):

Aug 21 22:50:22 dc2 dovecot: auth-worker(5179): Debug: auth(foo,127.0.0.1):
username changed foo -> DOMAIN\foo
Aug 21 22:50:22 dc2 dovecot: auth: Debug:
auth(foo,127.0.0.1,<0bBfg3/kpQB/AAAB>): username changed foo -> DOMAIN\foo
 Aug 21 22:50:22 dc2 dovecot: auth: Debug: client out:
OK#0111#011user=DOMAIN\foo

So the actual problem is that exim4 is delivering the mail to, for example,
"/var/mail/foo" but Dovecot is looking for the mailbox on
"/var/mail/DOMAIN\foo", even if the username given in the IMAP session is
just "foo". The wiki
mentionsthat "a PAM
module can change the username". Can this be avoided?

I need either:
* Exim to deliver the mail to the user mailbox, *including* the domain part
(out of scope of this list, but information is welcome), or
* Dovecot to fetch the mail *not* using the domain part as part of the
username variable.

As a quick and dirty workaround, I hardcoded the domain part in the exim
delivery path (something like "/var/mail/DOMAIN\\$local_part"), but this is
far from optimal since I cannot use both unix users and AD users, I cannot
use dovecot_delivery LDA transport, etc.

As a bottom line, I also posted this to the Samba list because I believe
this could also be solved if winbind just always returned the username
without the domain when queried (conf option not working, probable bug)

Ideas are welcome!!

Best regards,

Jorge


[Dovecot] Authentication process holding open filehandles

2012-05-06 Thread George Barnett
Hi,

We're using dovecot to provide pop3 for a number of mailboxes.  The setup is 
pretty simple:

Each user / domain has a mailstore in /data/mailstore///Maildir 
(backed by NFS).

Passwords are in simple passwd-file format in the top level domain directory eg:

# cat /data/mailstore/foo.com/.passwd 
user:{plain}password

The passdb setup looks like this.

passdb {
  args = username_format=%n /data/mailstore/%d/.passwd
  driver = passwd-file
}

The problem we're having is that when we want to remove a domain from the 
system and we go to rm -rf /data/mailstore// we are unable to because 
the auth process is still holding onto the file handles for the password file.

Can somebody suggest an alternative pattern that I could use for storing 
password files?  Ideally, we'd avoid one large file to prevent locking issues 
and would also keep the passwd-file setup since it's simple.

It would be possible to have the password files in a separate dir, but over 
time I'm guessing that would lead to nfs turds?  Easy to clean up I suppose, 
but maybe there's a simpler solution I'm missing?

George

Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
On Sat, May 5, 2012 at 11:44 AM, Agnello George wrote:

>
>
>> You need to configure Postfix to use dovecot as SASL provider. There are
>> some Howto's in the wiki.
>>
>> http://wiki2.dovecot.org/**HowTo/PostfixAndDovecotSASL<http://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL>
>> http://wiki2.dovecot.org/**HowTo/**VirtualUserFlatFilesPostfix<http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix>
>>
>> If you cannot solve it with this please provide dovecot -n, postfix -n
>> and logs with auth_debug=yes.
>>
>
>
> I had followed the documentation as per . however in the  i get the
> following error .
>
> [root@test /]# telnet 192.168.77.36 110
> Trying 192.168.77.36...
> Connected to mail.server.co.in (192.168.77.36).
> Escape character is '^]'.
> +OK Dovecot ready.
> user agnello
> +OK
> pass 123456
> Connection closed by foreign host.
>
> in the maillog i get the following error :
>
> May  5 11:30:43 mail dovecot: imap-login: Disconnected (no auth attempts):
> rip=192.168.70.12, lip=192.168.77.36
> May  5 11:30:55 mail dovecot: pop3-login: Login: user=,
> method=PLAIN, rip=192.168.70.12, lip=192.168.77.36, mpid=30400
> May  5 11:30:55 mail dovecot: pop3(agnello): Error: user agnello: Couldn't
> drop privileges: User is missing UID (see mail_uid setting)
> May  5 11:30:55 mail dovecot: pop3(agnello): Error: Internal error
> occurred. Refer to server log for more information.
>
>
> -
>
> my confi file details is as follows :
>
> cat  /etc/dovecot/passwd
> agnello:{plain}123456
>
>
> [root@mail ~]# cat /etc/dovecot/dovecot.conf
> # 2.0.9: /etc/dovecot/dovecot.conf
> # OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final)
> auth_verbose = yes
> disable_plaintext_auth = no
> passdb {
>   args = scheme=plain /etc/dovecot/passwd
>   driver = passwd-file
> }
> protocols = imap pop3
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> group = postfix
> mode = 0660
> user = postfix
>   }
> }
> ssl = no
> userdb {
>   driver = static
> }
>
>
> 
>
>
> [root@mail ~]# cat /etc/postfix/main.cf
> alias_database = hash:/etc/aliases
>
> these are my configuration files ..
>
> Can someone help me here
>
>
> thanks :)
>
>
>
>
>
>
>
>
>
>
>
> --
> Regards
> Agnello D'souza
>
>
>

Ok am sorry was not testing it correctly .

Form a remote server i tested the same smtp-auth test


[root@test /]# perl -MMIME::Base64 -e 'print
encode_base64("\000agnello\000123456")'
AGFnbmVsbG8AMTIzNDU2
[root@test /]# telnet 192.168.77.36 25
Trying 192.168.77.36...
Connected to mail.ddde.co.in (192.168.77.36).
Escape character is '^]'.

220 mail.ddde.co.in ESMTP Postfix
500 5.5.2 Error: bad syntax
ehlo testing
250-mail.ddde.co.in
250-PIPELINING
250-SIZE 1024
250-VRFY
250-ETRN
250-AUTH PLAIN
250-AUTH=PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN AGFnbmVsbG8AMTIzNDU2
235 2.7.0 Authentication successful
421 4.4.2 mail.ddde.co.in Error: timeout exceeded
Connection closed by foreign host.

-- 
Regards
Agnello D'souza


Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
>
> You need to configure Postfix to use dovecot as SASL provider. There are
> some Howto's in the wiki.
>
> http://wiki2.dovecot.org/**HowTo/PostfixAndDovecotSASL
> http://wiki2.dovecot.org/**HowTo/**VirtualUserFlatFilesPostfix
>
> If you cannot solve it with this please provide dovecot -n, postfix -n and
> logs with auth_debug=yes.
>


I had followed the documentation as per . however in the  i get the
following error .

[root@test /]# telnet 192.168.77.36 110
Trying 192.168.77.36...
Connected to mail.server.co.in (192.168.77.36).
Escape character is '^]'.
+OK Dovecot ready.
user agnello
+OK
pass 123456
Connection closed by foreign host.

in the maillog i get the following error :

May  5 11:30:43 mail dovecot: imap-login: Disconnected (no auth attempts):
rip=192.168.70.12, lip=192.168.77.36
May  5 11:30:55 mail dovecot: pop3-login: Login: user=,
method=PLAIN, rip=192.168.70.12, lip=192.168.77.36, mpid=30400
May  5 11:30:55 mail dovecot: pop3(agnello): Error: user agnello: Couldn't
drop privileges: User is missing UID (see mail_uid setting)
May  5 11:30:55 mail dovecot: pop3(agnello): Error: Internal error
occurred. Refer to server log for more information.


-

my confi file details is as follows :

cat  /etc/dovecot/passwd
agnello:{plain}123456


[root@mail ~]# cat /etc/dovecot/dovecot.conf
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final)
auth_verbose = yes
disable_plaintext_auth = no
passdb {
  args = scheme=plain /etc/dovecot/passwd
  driver = passwd-file
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
}
ssl = no
userdb {
  driver = static
}





[root@mail ~]# cat /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination


--


these are my configuration files ..

Can someone help me here


thanks :)











-- 
Regards
Agnello D'souza


Re: [Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
thanks a ton

>
>>
> PasswdFile seems what you want:
> http://wiki2.dovecot.org/**AuthDatabase/PasswdFile
>
>

Actually i did try this , i created a file called

cat /etc/dovecot/passwd
agnello:123456

i also added in dovecot

passdb {  driver = passwd-file  args = /etc/dovecot/passwd}

But still its gives me a relay access denied .

-- 
Regards
Agnello D'souza


[Dovecot] smtp -auth with using clear text password

2012-05-04 Thread Agnello George
Hi

I am setting up a mailserver .. where clients need to authenticate to the
mail server . The mta i am using is postfix . It is possible to use a file
like this :

--
cat /etc/postfix/dovecote_passwd
agnello:123456

-

where user is agnello and password is 123456

If you can please send me some reference links

thanks a ton



-- 
Regards
Agnello D'souza


[Dovecot] Dovecot 2.0.12 LMTP does not write +detail written to Delivered-To: header

2011-07-15 Thread Michael George
Hi Timo and List,

The Dovecot 2.0.10 changelog includes:

* LMTP: For user+detail@domain deliveries, the +detail is again written
  to Delivered-To: header.

I have recipient_delimiter = + set, lmtp_save_to_detail_mailbox=yes is
working, however Dovecot 2.0.12 LMTP processes are not adding these
headers to messages on delivery.

Are there other settings that may potentially conflict with this feature?


Re: [Dovecot] IMAP connection timeout value?

2010-09-30 Thread Sherin George
Hi,

I could see following in RFC 2683 & RFC 2060.


"To alleviate this, a server may implement an inactivity timeout,
unilaterally closing a session (after first sending an untagged BYE,
as noted above). Some server operators have reported dramatic
improvements in server performance after doing this. As specified in
[RFC-2060], if such a timeout is done it must not be until at least 30
minutes of inactivity. The reason for this specification is to prevent
clients from sending commands (such as NOOP) to the server at frequent
intervals simply to avert a too-early timeout. If the client knows
that the server may not time out the session for at least 30 minutes,
then the client need not poll at intervals more frequent than, say, 25
minutes."


So, shouldn't an imap server like dovevot be configured with 30 minutes timeout.

--
Kind Regards,
Sherin

On Fri, Sep 24, 2010 at 11:20 PM, Timo Sirainen  wrote:
> On Fri, 2010-09-24 at 10:24 +0530, Sherin George wrote:
>> Hello,
>>
>> I am also in  a similar position.
>>
>> I have a server sitting behind hardware firewall which is configured
>> to timeout all connections in 30 minutes.
>>
>> So, I would like to set dovecot to 30 minutes.
>
> Dovecot never disconnects IDLEing connections, because several clients
> expect to be able to do that. But I think you can configure kernel to
> send keepalive notifications more often (default is every 2,5h IIRC) and
> then it would notice died connections sooner.
>
>
>


Re: [Dovecot] IMAP connection timeout value?

2010-09-23 Thread Sherin George
Hello,

I am also in  a similar position.

I have a server sitting behind hardware firewall which is configured
to timeout all connections in 30 minutes.

So, I would like to set dovecot to 30 minutes.

Could some one please let me know whether it is possible or not, at least.

Thanks in advance.

--
Kind Regards,
Sherin

On Thu, Aug 19, 2010 at 4:34 PM, Tamas Kadar  wrote:
> (a) the server is on the internet and the clients are behind the dodgy cable
> modem.
>
> Yeah, except there are no alternatives to our ISPs at the moment, so I'd
> rather have a kind-of-solution with shorter timeouts...
>
> KT
>
> -Original Message-
> From: dovecot-bounces+tamas.kadar=espell@dovecot.org
> [mailto:dovecot-bounces+tamas.kadar=espell@dovecot.org] On Behalf Of
> William Blunn
> Sent: Thursday, August 19, 2010 1:02 PM
> To: dovecot@dovecot.org
> Subject: Re: [Dovecot] IMAP connection timeout value?
>
> On 19/08/2010 11:04, Tamas Kadar wrote:
>> So we're having some ISP issues lately, meaning we have to reboot our
>> cable modem like 2-3 times a day. An unfortunate side-effect I've
>> found is, once the users max out their connection limit (which I've
>> set to 10, and many people do), if we reboot the cable modem, they
>> can't log in cause their connections get 'stuck' until I `doveadm
>> kick` them, or wait for the connections to timeout which takes ???
>> minutes. Can I adjust that value to something like 30 seconds?
>
> Is it:
>
> (a) your server is on the Internet, and your clients are behind the dodgy
> cable modem, or
>
> (b) your mail server behind the dodgy cable modem and the clients are out on
> the Internet
>
> ?
>
> Either way I would suggest an improvement to your architecture would be to
> put the mail server on the same side of the dodgy cable modem as the
> majority of users.
>
> If you have a mix of office users and out-of-office users, I would say put
> the mail server on the Internet side. At least then the people struggling
> out in a hotel in the middle of nowhere won't have to fight your dodgy cable
> modem as well as their dodgy foreign internet connection.
>
> Bill
>
>


Re: [Dovecot] Dovecot fails when vpopmail is enabled

2009-10-05 Thread Sherin George
Hello Timo,

Thank you so much for your kind help.

I think I found the problem.


Oct  5 17:54:41 a1 dovecot: Dovecot v1.0.7 starting up
Oct  5 17:54:41 a1 dovecot: Auth process died too early - shutting down
Oct  5 17:54:41 a1 dovecot: auth(default): Unknown passdb driver 'vpopmail'
(typo, or Dovecot was built without support for it? Check with dovecot
--build-options)
Oct  5 17:54:41 a1 dovecot: child 15274 (auth) returned error 89

-bash-3.2#
-bash-3.2# dovecot --build-options
Build options: ioloop=epoll notify=inotify ipv6 openssl
Mail storages: cydir dbox maildir mbox raw shared
SQL drivers:
Passdb: checkpassword passwd passwd-file shadow vpopmail
Userdb: nss passwd passwd-file prefetch static vpopmail
==

I am trying to build dovecot from source now.

Regards,
Sherin

On Mon, Oct 5, 2009 at 6:34 PM, Timo Sirainen  wrote:

> On Oct 4, 2009, at 7:36 PM, Sherin George wrote:
>
>  I am trying to enable vpomail support in dovecot.
>>
>> I am not able to run dovecot after this.
>>
>
> What does it log? http://wiki.dovecot.org/Logging
>
>


[Dovecot] Dovecot fails when vpopmail is enabled

2009-10-04 Thread Sherin George
Hello Friends,

=
-bash-3.2# dovecot --version
1.2.5
-bash-3.2# dovecot -n
# 1.2.5: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.18-128.4.1.el5xen x86_64 CentOS release 5.2 (Final)
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
lda:
  postmaster_address: postmas...@example.com
auth default:
  passdb:
driver: pam
  userdb:
driver: passwd
=


I am trying to enable vpomail support in dovecot.

I modified default dovecot conf file as given below.

===
-bash-3.2# diff /etc/dovecot.conf /etc/dovecot.conf.original
691c691
< auth_cache_size = 1000
---
> #auth_cache_size = 0
886c886
<   passdb vpopmail {
---
>   #passdb vpopmail {
888,890c888,890
< args = cache_key=%u%s *
<   }
<
---
> #args =
>   #}
>
===

I am not able to run dovecot after this.

=
-bash-3.2# /etc/init.d/dovecot restart
Stopping Dovecot Imap: [FAILED]
Starting Dovecot Imap: [  OK  ]
-bash-3.2# /etc/init.d/dovecot restart
Stopping Dovecot Imap: [FAILED]
Starting Dovecot Imap: [  OK  ]
-bash-3.2# /etc/init.d/dovecot restart
Stopping Dovecot Imap: [FAILED]
Starting Dovecot Imap: [  OK  ]
-bash-3.2#
=

Could some one please help me to find what went wrong.

--
Thanks,
Sherin


Re: [Dovecot] I've moved to US

2009-02-10 Thread Kyle George

On Mon, 9 Feb 2009, Timo Sirainen wrote:


All bread tastes weird, I'm not sure why.


It could be the water.


But there are some positive things, like grocery stores being open 24h
and when driving turning to right is allowed on red light :)


Careful: there's no right-on-red in New York City (and there are no signs 
about it!).


--
Kyle George


Re: [Dovecot] spamassassin, postfix with dovecot lda?

2008-06-03 Thread George Mamalakis

Hello Nicolas,

I tried the mailbox_transport = dovecot directive, with no luck, since I 
was using virtual mailboxes, where virtual_transport is responsible for 
delivery. What really helped, though, was the dovecot line in master.cf, 
which after a few tweaks allowed me to make things work eventually!


Thank you again for your help, 



Hello,

I am currently running a similar setup, with spamc called per user at
delivery time, from postfix. I use the following settings (on a Debian
Etch system, so installation paths must be adapated).

- dovecot's deliver binary must be set setuid root,

- /etc/postfix/main.cf:

mailbox_transport = dovecot
dovecot_destination_recipient_limit = 1


- /etc/postfix/master.cf:

#
# dovecot
#
dovecot unix-   n   n   -   1   pipe
  flags=Rh user=dovecot argv=/usr/bin/spamc -u ${user} -e 
/usr/lib/dovecot/deliver -d ${user} -f ${sender}


  



--
George Mamalakis

IT Officer
Electrical and Computer Engineer (Aristotle Un. of Thessaloniki),
MSc (Imperial College of London)

Department of Electrical and Computer Engineering
Faculty of Engineering
Aristotle University of Thessaloniki




Re: [Dovecot] spamassassin, postfix with dovecot lda?

2008-06-02 Thread George Mamalakis

Hi Egbert,

thank you for your reply. I searched www.postfixvirtual.net, as you 
suggested, with no luck. Their configuration differs significantly from 
mine, since they are using CYRUS libraries in general, and not dovecot. 
Moreover, the configuration that is proposed uses a vmail user (or some 
general-mail-user) which is not something I would like to adhere into my 
configuration. I would like each user to have their own preferences, 
quotas, permissions, etc as far as their email is concerned. Lastly, the 
idea of using maildrop for local delivery instead of dovecot-lda passed 
through my mind, but when i tried to combine it with my configuration  
it didn't work; it probably needed cyrus libraries and not dovecot 
libraries. I think that if i manage to set it up correctly (if feasible, 
of course), then I would have found my solution.


Thanks again,

Egbert Jan van den Bussche wrote:


George Mamalakis wrote:

Hi all,

I am trying to setup a mail server using postfix (virtual_mailboxes), 
spamassassin and dovecot, along with SQL where appropriate. From my 
research so far I realized that, for several reasons, it is required 
for me to use dovecot LDA instead of maildrop, local, procmail or 
other alternatives.


My configuration was working flawlessly, until spamassassin per-user 
configuration came to play. If I just wanted an MTA anti-spam 
gateway, I could directly call spamassassin via master.cf, or through 
some helper "content-filter-application" (like amavis or 
amavisd-new), and everything would work just fine (I tried and tested 
many such configurations with success). But when antispam per user 
preferences became my concern (Bayesian filters and classifier), I 
realized that spamd should be called by the LDA. With procmail this 
was a trivial issue, with dovecot-lda I was unable to find any 
solution on the web or other documentation.


So my question is as follows:
   Is there a way to call spamc from dovecot-LDA (and/or 
dovecot-sieve), or is there an alternate way to do this for a site 
with virtual mailboxes configured with dovecot-lda?


Thank you all in advance,

regards,



Hi George. You seem to have a similar setup as I have here. I found 
www.postfixvirtual.net most useful! Do have a look there.


I just had a 12 hour fight to get all running again after a upgrade 
from Mandriva 2008.0 to 2008.1. That should have been trivial but I 
had all sort of issues with amavisd missing perl modules. Well, 
finally solved that one again.


Egbert Jan (NL)



--
George Mamalakis





[Dovecot] spamassassin, postfix with dovecot lda?

2008-06-02 Thread George Mamalakis

Hi all,

I am trying to setup a mail server using postfix (virtual_mailboxes), 
spamassassin and dovecot, along with SQL where appropriate. From my 
research so far I realized that, for several reasons, it is required for 
me to use dovecot LDA instead of maildrop, local, procmail or other 
alternatives.


My configuration was working flawlessly, until spamassassin per-user 
configuration came to play. If I just wanted an MTA anti-spam gateway, I 
could directly call spamassassin via master.cf, or through some helper 
"content-filter-application" (like amavis or amavisd-new), and 
everything would work just fine (I tried and tested many such 
configurations with success). But when antispam per user preferences 
became my concern (Bayesian filters and classifier), I realized that 
spamd should be called by the LDA. With procmail this was a trivial 
issue, with dovecot-lda I was unable to find any solution on the web or 
other documentation.


So my question is as follows:
   Is there a way to call spamc from dovecot-LDA (and/or 
dovecot-sieve), or is there an alternate way to do this for a site with 
virtual mailboxes configured with dovecot-lda?


Thank you all in advance,

regards,

--
George Mamalakis
IT Officer, 
Department of Electrical and Computer Engineering,

Aristotle Univ. of Thessaloniki, Greece




Re: [Dovecot] Ideas for Webmail/OTP

2007-07-23 Thread Phillip T. George

Joakim Ryden wrote:

On Mon, July 23, 2007 10:54 am, Phillip T. George wrote:
[...]
  

Oh...also his post did include "/OTP", which unless I'm mistaken, than means


Off-Topic Post ..so it doesn't really matter if it had to do with Dovecot or
not, right? :)

:-)

I believe he was referring to One Time Passwords.

--Jo



  
Sorry for the poorly delivered jokeI was attempting to lighten the 
mood, since it started seem a bit flamey :)


Re: [Dovecot] Ideas for Webmail/OTP

2007-07-23 Thread Phillip T. George



Phillip T. George wrote:

Charles Marcus wrote:

Phillip T. George, on 7/23/2007 1:30 PM, said the following:

Charles Marcus wrote:

Phillip T. George, on 7/23/2007 1:00 PM, said the following:
SSL/TLS is not going to solve the keylogger and malware problem.  
Basically, if you're on a public (or even a friend's) computer and 
someone decides to monitor keystrokes using some application, your 
password will be completely compromised.



Well, thats true, but this really isn't a dovecot issue...


Well, actually it is.  Dovecot could possibly need some sort of 
authorization module addition to achieve what Frank Behrens was 
wanting to achieve.


Interesting... does any other mail server support anything like this? 
Not that that should be the sole criteria to judge whether or not 
something should be added, but...


I'm not sure if there is a mail server out there that has that 
specific feature.  Security innovations are surely good innovations to 
bring forth.



Oh...also his post did include "/OTP", which unless I'm mistaken, than 
means Off-Topic Post ..so it doesn't really matter if it had to do with 
Dovecot or not, right? :)


-Phillip


Re: [Dovecot] Ideas for Webmail/OTP

2007-07-23 Thread Phillip T. George

Charles Marcus wrote:

Phillip T. George, on 7/23/2007 1:30 PM, said the following:

Charles Marcus wrote:

Phillip T. George, on 7/23/2007 1:00 PM, said the following:
SSL/TLS is not going to solve the keylogger and malware problem.  
Basically, if you're on a public (or even a friend's) computer and 
someone decides to monitor keystrokes using some application, your 
password will be completely compromised.



Well, thats true, but this really isn't a dovecot issue...


Well, actually it is.  Dovecot could possibly need some sort of 
authorization module addition to achieve what Frank Behrens was 
wanting to achieve.


Interesting... does any other mail server support anything like this? 
Not that that should be the sole criteria to judge whether or not 
something should be added, but...


I'm not sure if there is a mail server out there that has that specific 
feature.  Security innovations are surely good innovations to bring forth.





Re: [Dovecot] Ideas for Webmail/OTP

2007-07-23 Thread Phillip T. George

Charles Marcus wrote:

Phillip T. George, on 7/23/2007 1:00 PM, said the following:
SSL/TLS is not going to solve the keylogger and malware problem.  
Basically, if you're on a public (or even a friend's) computer and 
someone decides to monitor keystrokes using some application, your 
password will be completely compromised.


Well, thats true, but this really isn't a dovecot issue...

Well, actually it is.  Dovecot could possibly need some sort of 
authorization module addition to achieve what Frank Behrens was wanting 
to achieve.


-Phillip


Re: [Dovecot] Ideas for Webmail/OTP

2007-07-23 Thread Phillip T. George

Charles Marcus wrote:

On 7/23/2007, Frank Behrens ([EMAIL PROTECTED]) wrote:
I want to discuss some problems/enhancements for dovecot in a 
webmail/otp setup.


For access to an IMAP server like dovecot I see different client types:
a) a "normal" MUA installed in a more or less trusted environment
b) remote access via "webmail" from untrusted environments


What about:
c) a "normal" MUA accessing via the internet from  untrusted environments

This is the recommended way all of our users access their email - 
webmail is just for the occasional access from a friends or other 
computer that they don't use regularly.


For a) I see with dovecot and other IMAP servers no problems, tricky 
is the setup for b).


Webmail is very easy to do...


If you use a webmail client in an untrusted environment the risk is
high, that keyloggers and  other malware steal your password.


Eh? Thats what SSL/TLS is for... I agree that providing access - 
either via webmail or any other MUA - on an unsecured connection from 
an untrusted source is very hazardous - but setting up SSL is fairly 
simple too, and I even force SSL/TLS on all of my connections even 
inside our trusted network (no reason not to - the extra overhead is 
very small).


SSL/TLS is not going to solve the keylogger and malware problem.  
Basically, if you're on a public (or even a friend's) computer and 
someone decides to monitor keystrokes using some application, your 
password will be completely compromised.

Sorry, but I don't understand the problem you are trying to solve...



Re: [Dovecot] LIST % not returning correct data?

2007-06-25 Thread Phillip T. George

Timo Sirainen wrote:

On Fri, 2007-06-22 at 17:14 +0200, [EMAIL PROTECTED] wrote:
  

in an installation migrated from courier. I am testing with Outlook
Mobile 5 (OM) which uses 'LIST "" %' to get the folder list. Now
courier used to return

 * LIST (\HasChildren) "." "INBOX"

whereas dovecot returns

 * LIST (\HasNoChildren) "." "INBOX"

which is why OM failes to display any folder. Is this dovecot's failure
or am I missing something here?



It's a bug. Fixed, sort of:
http://hg.dovecot.org/dovecot-1.0/rev/f92ea3eed616

I think I'll do yet another LIST rewrite for v1.1. It's unbelievably
hard to get the logic right when you support multiple configurable
namespaces..

  


This actually may be the same issue I was having with Outlook 2003 
favorite folders.  Looks like Dovecot rdoes "HasNoChildren" for some 
reason, whereas Courier does "HasChildren".


Thanks,
Phillip


Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-18 Thread Phillip T. George

Timo Sirainen wrote:

On Fri, 2007-06-15 at 14:14 -0500, Phillip T. George wrote:
  

Phillip T. George wrote:


Kenny Dail wrote:
  

problem may be?  With the previous IMAP server (courier I believe) this
wasn't a problem...so it leads me to believe that Dovecot might be the
problem.  I'm working with Dovecot 1.0.rc28
  


There was one security fix and a fix related to listing folders since
then. RC29 made some big changes, ou probably want to try updating to
1.0.1.
http://dovecot.org/list/dovecot-news/2007-March/39.html
  


Ack!  Thanks for the info...I'll go for the update.

Thanks,
Phillip
  

Actually, upgrading to 1.0.1 didn't seem to fix it...



If the favorite folders aren't the same thing as subscribed folders, I
don't know how this can have anything to do with Dovecot itself.

Maybe Outlook's internal cache got broken somehow. Try to recreate the
account and see if it works then.

  

Timo,

The "favorite folders" are basically links to the subscribed folders.  
Its basically just a shortcut menu.


This was a new Outlook install.  Also, it works with Courier (used the 
same Outlook account, etc).  Here's the log (RQ-Spam, and RQ-Ham are the 
favorite folders and the only folders in existence):


Microsoft Internet Messaging API 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)
IMAP Log started at 06/18/2007 11:40:20
IMAP: 11:40:20 [db] Connecting to 'mail.domain.com' on port 143.
IMAP: 11:40:20 [db] OnNotify: asOld = 0, asNew = 4, ae = 0
IMAP: 11:40:20 [db] OnNotify: asOld = 4, asNew = 5, ae = 2
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 4
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN 
NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL 
ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double 
Precision, Inc.  See COPYING for distribution information.

IMAP: 11:40:20 [tx] anen CAPABILITY
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION 
STARTTLS

IMAP: 11:40:20 [rx] anen OK CAPABILITY completed
IMAP: 11:40:20 [tx] LOGIN command sent
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] l3uy OK LOGIN Ok.
IMAP: 11:40:20 [tx] b3zg IDLE
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] + entering idle mode
IMAP: 11:40:20 [tx] DONE
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] b3zg OK IDLE completed
IMAP: 11:40:20 [tx] y1jn LIST "" "INBOX"
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] * LIST (\Unmarked \HasChildren) "." "INBOX"
IMAP: 11:40:20 [rx] y1jn OK LIST completed
IMAP: 11:40:20 [tx] iccm LSUB "" "%"
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] * LSUB (\Noselect \HasChildren) "." "INBOX"
IMAP: 11:40:20 [rx] iccm OK LSUB completed
IMAP: 11:40:20 [tx] l9wo LSUB "" "%.%"
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] * LSUB (\HasNoChildren) "." "INBOX.RQ-Spam"
IMAP: 11:40:20 [rx] * LSUB (\HasNoChildren) "." "INBOX.RQ-Ham"
IMAP: 11:40:20 [rx] l9wo OK LSUB completed
IMAP: 11:40:20 [tx] aghb IDLE
IMAP: 11:40:20 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 11:40:20 [rx] + entering idle mode
IMAP: 11:40:31 [tx] Dropping connection, LOGOUT sent
IMAP: 11:40:31 [db] Connection to 'mail.domain.com' closed.
IMAP: 11:40:31 [db] OnNotify: asOld = 5, asNew = 0, ae = 5


Thanks,
Phillip



Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-15 Thread Phillip T. George



Phillip T. George wrote:



Kenny Dail wrote:

problem may be?  With the previous IMAP server (courier I believe) this
wasn't a problem...so it leads me to believe that Dovecot might be the
problem.  I'm working with Dovecot 1.0.rc28
  

There was one security fix and a fix related to listing folders since
then. RC29 made some big changes, ou probably want to try updating to
1.0.1.
http://dovecot.org/list/dovecot-news/2007-March/39.html
  


Ack!  Thanks for the info...I'll go for the update.

Thanks,
Phillip


Actually, upgrading to 1.0.1 didn't seem to fix it...

-Phillip


Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-15 Thread Phillip T. George



Kenny Dail wrote:

problem may be?  With the previous IMAP server (courier I believe) this
wasn't a problem...so it leads me to believe that Dovecot might be the
problem.  I'm working with Dovecot 1.0.rc28
  

There was one security fix and a fix related to listing folders since
then. RC29 made some big changes, ou probably want to try updating to
1.0.1.
http://dovecot.org/list/dovecot-news/2007-March/39.html
  


Ack!  Thanks for the info...I'll go for the update.

Thanks,
Phillip


Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-15 Thread Phillip T. George

Mark Richards wrote:

Phillip T. George wrote:
Correct.  If I choose not to save the password, close Outlook, and 
open it back up ... I can see the favorite folders links for the IMAP 
subfolders.  After I put my password in, they disappear.


Did you try the "subscription" process to the folder?  Just a guess.  
I would agree that favorites aren't stored on the server but they do 
depend upon the server being present.  One would think these would not 
be present until you login rather than the other way around.


Frankly Outlook and IMAP sucks.  I switched to Thunderbird (giving up 
a decent address book, calendar and palm sync) because as an email 
client Outlook was useless.


/mark




What exactly do you mean by the "subscription" process?  The folder was 
already manually subscribed to using Outlook.  The subscription shows up 
every time.  I think it does disappear and then reappear though...


Yeah.  I'd be a member of the choir that you're preaching to.  I've used 
Thunderbird for quite some time myself (3 years perhaps?), however, my 
company provides hosting services, so saying no to Outlook isn't exactly 
an option.


-Phillip


Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-14 Thread Phillip T. George

Phillip T. George wrote:

Scott Silva wrote:

Phillip T. George spake the following on 6/14/2007 12:50 PM:
 

Hello all,

I'm having an issue with Outlook 2003, where favorite folders seem to
disappear.  Specifically, they are subfolders of the Inbox.  The Inbox
favorite folder stays there without a problem.  Any clues as to what 
the

problem may be?  With the previous IMAP server (courier I believe) this
wasn't a problem...so it leads me to believe that Dovecot might be the
problem.  I'm working with Dovecot 1.0.rc28

Thanks,
Phillip



IMHO Outlook doesn't keep it's favorites folder on an imap server, it is
stored locally.
  
Correct.  If I choose not to save the password, close Outlook, and 
open it back up ... I can see the favorite folders links for the IMAP 
subfolders.  After I put my password in, they disappear.


-Phillip

Also, here's some info from Outlook's log.  I added the favorite folders 
and then closed Outlook.  The log below is what happened when I opened 
Outlook back up after that.


IMAP: 15:37:58 [db] Connecting to 'mail.domain.com' on port 143.
IMAP: 15:37:58 [db] OnNotify: asOld = 0, asNew = 2, ae = 0
IMAP: 15:37:58 [db] srv_name = "mail.domain.com" srv_addr = 11.22.33.44
IMAP: 15:37:58 [db] OnNotify: asOld = 2, asNew = 3, ae = 1
IMAP: 15:37:58 [db] OnNotify: asOld = 3, asNew = 4, ae = 0
IMAP: 15:37:58 [db] OnNotify: asOld = 4, asNew = 5, ae = 2
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 4
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] * OK Dovecot ready.
IMAP: 15:37:58 [tx] qr4i CAPABILITY
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] * CAPABILITY IMAP4rev1 SASL-IR SORT 
THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE 
LOGIN-REFERRALS STARTTLS AUTH=PLAIN AUTH=LOGIN

IMAP: 15:37:58 [rx] qr4i OK Capability completed.
IMAP: 15:37:58 [tx] LOGIN command sent
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] h4rz OK Logged in.
IMAP: 15:37:58 [tx] 1mxp IDLE
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] + idling
IMAP: 15:37:58 [tx] DONE
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] 1mxp OK Idle completed.
IMAP: 15:37:58 [tx] q00b LIST "" ""
IMAP: 15:37:58 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:58 [rx] q00b OK List completed.
IMAP: 15:37:58 [tx] t926 IDLE
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] + idling
IMAP: 15:37:59 [tx] DONE
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] t926 OK Idle completed.
IMAP: 15:37:59 [tx] 2uhg LIST "" "INBOX"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] * LIST (\HasNoChildren) "." "INBOX"
IMAP: 15:37:59 [rx] 2uhg OK List completed.
IMAP: 15:37:59 [tx] 2c9i LSUB "" "*"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] * LSUB () "." "INBOX.RQ-Spam"
IMAP: 15:37:59 [rx] * LSUB () "." "INBOX.RQ-Ham"
IMAP: 15:37:59 [rx] 2c9i OK Lsub completed.
IMAP: 15:37:59 [tx] m571 LIST "" "INBOX"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] * LIST (\HasNoChildren) "." "INBOX"
IMAP: 15:37:59 [rx] m571 OK List completed.
IMAP: 15:37:59 [tx] 2u8h LSUB "" "*"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] * LSUB () "." "INBOX.RQ-Spam"
IMAP: 15:37:59 [rx] * LSUB () "." "INBOX.RQ-Ham"
IMAP: 15:37:59 [rx] 2u8h OK Lsub completed.
IMAP: 15:37:59 [tx] r9xa CREATE "Junk E-mail"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] r9xa NO Unknown namespace.
IMAP: 15:37:59 [tx] y51e SUBSCRIBE "Junk E-mail"
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] y51e NO Unknown namespace.
IMAP: 15:37:59 [tx] c948 IDLE
IMAP: 15:37:59 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:37:59 [rx] + idling


Thanks,
Phillip


Re: [Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-14 Thread Phillip T. George

Scott Silva wrote:

Phillip T. George spake the following on 6/14/2007 12:50 PM:
  

Hello all,

I'm having an issue with Outlook 2003, where favorite folders seem to
disappear.  Specifically, they are subfolders of the Inbox.  The Inbox
favorite folder stays there without a problem.  Any clues as to what the
problem may be?  With the previous IMAP server (courier I believe) this
wasn't a problem...so it leads me to believe that Dovecot might be the
problem.  I'm working with Dovecot 1.0.rc28

Thanks,
Phillip



IMHO Outlook doesn't keep it's favorites folder on an imap server, it is
stored locally.
  
Correct.  If I choose not to save the password, close Outlook, and open 
it back up ... I can see the favorite folders links for the IMAP 
subfolders.  After I put my password in, they disappear.


-Phillip


[Dovecot] Outlook 2003 - Disappearing favorite folders

2007-06-14 Thread Phillip T. George

Hello all,

I'm having an issue with Outlook 2003, where favorite folders seem to 
disappear.  Specifically, they are subfolders of the Inbox.  The Inbox 
favorite folder stays there without a problem.  Any clues as to what the 
problem may be?  With the previous IMAP server (courier I believe) this 
wasn't a problem...so it leads me to believe that Dovecot might be the 
problem.  I'm working with Dovecot 1.0.rc28


Thanks,
Phillip


[Dovecot] IMAP Bandwidth Monitoring

2007-05-27 Thread Phillip T. George

Hello all,

I'm wanting to set up IMAP bandwidth monitoring, but I don't see any 
IMAP size transfer entries in the log file.  How would I turn this on?  
Please refer me to the manual if I've somehow missed it :)


Thanks,
Phillip


[Dovecot] Trying to modify the source - fopen problems

2007-04-27 Thread Phillip T. George

Hello all,

I don't know if this needs to be sent to a different list or not, if so, 
please let me know.


Anyways, I'm trying to modify the dovecot source a bit, but the problem 
I'm having is that whenever I use "fopen", it always returns NULL.  I've 
tried a variety of things, even fopen("/dev/null", "w") -- because that 
should almost always work.  I'm trying to get it to work in 
src/pop3-login/client-authenticate.c


Any idea why this might be happening?  Any suggestions as to where to 
put the code instead?  (I'm trying to check the username against some 
information in a file OR pass the username to a process and have it do 
the work)


Thanks,
Phillip


[Dovecot] Dovecot and Outlook - IMAP Timeout error

2007-04-25 Thread Phillip T. George

Hey guys,

I'm having a problem with Dovecot and Outlook.  I'm testing with Outlook 
XP (2002), but the problem occurs with Outlook 2003 as well.  I'm using 
Dovecot 1.0.rc28.


The specific error generated (for IMAP) is:
"A connection to the server could not be established.   is 
now in offline mode."

In the details:
"There may be a server or network problems or your timeout interval may 
be too short.

   Protocol: IMAP
   Server: 
   Port: 143"

It is set up with a POP3 account and an IMAP account within Outlook -- 
using the same physical email account.  The IMAP portion is only used 
for spam / ham submission, while the POP3 is used for downloading the 
actual email.  The account on the server being used is named 
"me2.pg.east.eacsd.com"


I have a single IMAP account set up in Thunderbird, which is using the 
account name "me.pg.east.eacsd.com".  All mail that is received at 
"me.pg.east.eacsd.com" is forwarded to "me2.pg.east.eacsd.com" to 
generate some traffic.


Here is the snippet of the mail log which involves me2.pg.east.eacsd.com 
( | grep me2.pg.east.eacsd.com | grep -i imap):
Apr 25 02:40:11 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38
Apr 25 02:40:13 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected 
in IDLE
Apr 25 02:41:10 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected: 
Logged out
Apr 25 02:45:41 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38
Apr 25 02:45:41 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38

Apr 25 02:46:18 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 02:46:18 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 02:50:49 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38
Apr 25 02:50:50 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38

Apr 25 02:51:27 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 02:51:27 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 02:55:58 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38
Apr 25 02:55:58 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38

Apr 25 02:56:56 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 02:56:56 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 03:01:27 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38
Apr 25 03:01:27 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38

Apr 25 03:01:58 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected
Apr 25 03:01:58 east dovecot: IMAP(me2.pg.east.eacsd.com): Disconnected

There's more before that, but I'd figured that would be enough:
Apr 24 17:18:05 east dovecot: IMAP(me.pg.east.eacsd.com): Disconnected 
in IDLE
Apr 24 17:19:34 east dovecot: IMAP(me.pg.east.eacsd.com): Disconnected 
in IDLE
Apr 24 17:19:42 east dovecot: IMAP(me.pg.east.eacsd.com): Disconnected 
in IDLE
Apr 24 17:20:27 east dovecot: IMAP(me.pg.east.eacsd.com): Disconnected 
in IDLE
Apr 24 17:20:42 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38, TLS
Apr 24 17:43:18 east dovecot: imap-login: Login: 
user=, method=PLAIN, rip=68.14.165.23, 
lip=64.22.71.38, TLS



As you can see from the logs, Thunderbird didn't have a problem, which 
eliminates the possibility of a bad net connection (I'd assume...but I 
could be wrong).  The problem occurred at 3AM.  Some people during the 
day can get it every hour or so.  I was able to get it to occur twice 
(the first time is not shown in these logs).


My questions. . .
1. Is there any way to fix this Outlook problem?  I have all of the 
outlook workarounds enabled (along with some for Netscape):

 imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh

2. Should Outlook really be connecting and disconnecting that often?

3. Could the problem be occurring because of POP3 and IMAP being used by 
the same account, and the quick downloading of email via POP3 is 
eliminating the email for IMAP, thereby causing inactivity in IMAP?  Is 
there a workaround or a known Outlook settings to fix this?



Thanks,
Phillip



Re: [Dovecot] SASL Problems

2007-04-23 Thread Phillip T. George

Phillip T. George wrote:

Phillip T. George wrote:

Hello all,

I seem to be having a problem with SASL.  It doesn't seem to work 
with Outlook.  Upon searching a bit, I found that I need to enable 
"login" for auth mechanisms.  However, when I do that, (after I stop 
and start dovecot and postfix), and then try to use SMTP auth using 
Outlook, it causes postfix to crash.  It works fine with Thunderbird 
still though.  Any ideas as to what the cause might be?


I'm using Dovecot 1.0.0 and Postfix 2.3.5.

Thanks,
Phillip



I thought I should add, that when I just had the auth mechanisms set 
to "plain", Outlook was not crashing, but it also was not working.  
(It was giving a relay access denied error)


-Phillip

Ack!  Nevermind.  Its not anything natively caused by Dovecot or Postfix 
(that was version 2.3.8, not 2.3.5 BTW).  I made a modification to the 
Postfix source code and that modification appears to be causing the problem.


-Phillip


Re: [Dovecot] SASL Problems

2007-04-23 Thread Phillip T. George

Phillip T. George wrote:

Hello all,

I seem to be having a problem with SASL.  It doesn't seem to work with 
Outlook.  Upon searching a bit, I found that I need to enable "login" 
for auth mechanisms.  However, when I do that, (after I stop and start 
dovecot and postfix), and then try to use SMTP auth using Outlook, it 
causes postfix to crash.  It works fine with Thunderbird still 
though.  Any ideas as to what the cause might be?


I'm using Dovecot 1.0.0 and Postfix 2.3.5.

Thanks,
Phillip



I thought I should add, that when I just had the auth mechanisms set to 
"plain", Outlook was not crashing, but it also was not working.  (It was 
giving a relay access denied error)


-Phillip


[Dovecot] SASL Problems

2007-04-23 Thread Phillip T. George

Hello all,

I seem to be having a problem with SASL.  It doesn't seem to work with 
Outlook.  Upon searching a bit, I found that I need to enable "login" 
for auth mechanisms.  However, when I do that, (after I stop and start 
dovecot and postfix), and then try to use SMTP auth using Outlook, it 
causes postfix to crash.  It works fine with Thunderbird still though.  
Any ideas as to what the cause might be?


I'm using Dovecot 1.0.0 and Postfix 2.3.5.

Thanks,
Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-17 Thread Phillip T. George



Timo Sirainen wrote:

On 17.4.2007, at 0.11, Phillip T. George wrote:

Oh..hmm.  I may have left an important part of the log file out...it 
was previously grepped, but here it is, with the delete line in the 
middle:
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), 
IP(70.177.64.93): copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), 
IP(70.177.64.93): deleted: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), 
IP(70.168.68.56): copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>


"deleted" means it was marked with \Deleted flag. The message still 
exists in the mailbox so it can be copied. Only after it's expunged, 
it's really gone.


Ahh...right.  Thanks again.


Re: [Dovecot] Duplicate E-mail Problem

2007-04-16 Thread Phillip T. George

Phillip T. George wrote:

Timo Sirainen wrote:

On Mon, 2007-04-16 at 13:21 -0500, Phillip T. George wrote:
 
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), 
IP(70.177.64.93): copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), 
IP(70.168.68.56): copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>


It appears that the problem is that the user has two email programs 
running the same filters at the same time.  Somehow, this creates a 
duplicate message.  Any clues as to why this might be?  Are there 
any options that may cause this behavior to change?  I thought maybe 
the options "maildir_copy_with_hardlinks" and/or 
"maildir_copy_preserve_filename" may be helpful options...(they're 
both set to the default of 'no').



The message gets duplicated to Spam of course, but do you mean it also
gets duplicated to INBOX?

If you meant that they're duplicated in Spam, it just can't be helped.
It's perfectly valid for an IMAP client to copy the same message twice
to another mailbox. Set up a server-side filtering instead.

  


Its copied twice to Spam...its not in the INBOX any longer.  
Well...the duplicates were not a problem before when using 
courier-imap (though on a different server).  I'm not too terribly 
concerned with the issue any longer, as the issue could very much 
considered client side.  Thanks for the help!  If you do have any 
other suggestions (or if anyone else does) on fixing the issue, I'd 
still like to know.


-Phillip

Oh..hmm.  I may have left an important part of the log file out...it was 
previously grepped, but here it is, with the delete line in the middle:
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.177.64.93): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.177.64.93): 
deleted: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.168.68.56): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>


The other important part is that there is not a delete after that, but 
the mail is not still in the inbox.  So instead of copy, delete, copy, 
its actually of copy, copy, delete -- which is inconsistent with the log 
file.


-Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-16 Thread Phillip T. George

Timo Sirainen wrote:

On Mon, 2007-04-16 at 13:21 -0500, Phillip T. George wrote:
  
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.177.64.93): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.168.68.56): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>


It appears that the problem is that the user has two email programs 
running the same filters at the same time.  Somehow, this creates a 
duplicate message.  Any clues as to why this might be?  Are there any 
options that may cause this behavior to change?  I thought maybe the 
options "maildir_copy_with_hardlinks" and/or 
"maildir_copy_preserve_filename" may be helpful options...(they're both 
set to the default of 'no').



The message gets duplicated to Spam of course, but do you mean it also
gets duplicated to INBOX?

If you meant that they're duplicated in Spam, it just can't be helped.
It's perfectly valid for an IMAP client to copy the same message twice
to another mailbox. Set up a server-side filtering instead.

  


Its copied twice to Spam...its not in the INBOX any longer.  Well...the 
duplicates were not a problem before when using courier-imap (though on 
a different server).  I'm not too terribly concerned with the issue any 
longer, as the issue could very much considered client side.  Thanks for 
the help!  If you do have any other suggestions (or if anyone else does) 
on fixing the issue, I'd still like to know.


-Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-16 Thread Phillip T. George

Timo Sirainen wrote:

On Fri, 2007-04-13 at 09:10 -0500, Phillip T. George wrote:
  
Anyway, I'm having a problem, that may or may not be related to 
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails are 
appearing.  These emails have exactly the same queue ID, so its not that 
they were sent multiple times.  These dup emails do not show up to me ever.



What kind of filenames do they have in maildir? Do you see anything in
Dovecot's error logs? The only reason why Dovecot would internally
duplicate messages is if it detects multiple filenames with same base
name, which aren't hardlinks to each others. And that could happen if
the maildir filenames aren't truly unique. You said you're using
Procmail, are you sure you're not using MH filenames
(http://wiki.dovecot.org/MailboxFormat/Maildir)?

If that's not the problem, you can enable mail_log plugin and check if
it logs that the client does a duplicate COPY.
http://wiki.dovecot.org/Plugins/MailLog
  


Ok.  Using the logging, I saw 2 entries today:
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.177.64.93): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>
Apr 16 12:51:45 east dovecot: IMAP(user.domain.com), IP(70.168.68.56): 
copy -> Spam: uid=718, msgid=<[EMAIL PROTECTED]>


It appears that the problem is that the user has two email programs 
running the same filters at the same time.  Somehow, this creates a 
duplicate message.  Any clues as to why this might be?  Are there any 
options that may cause this behavior to change?  I thought maybe the 
options "maildir_copy_with_hardlinks" and/or 
"maildir_copy_preserve_filename" may be helpful options...(they're both 
set to the default of 'no').


Any recommendations?

Thanks,
Phillip



Re: [Dovecot] mail_log plugin

2007-04-16 Thread Phillip T. George

Timo Sirainen wrote:

On Mon, 2007-04-16 at 11:34 -0500, Phillip T. George wrote:
  

Hello all,

Is there any way to add additional options for the mail_log plugin?  
Specifically, I'm wanting to make it so IMAP copy commands will show the 
source filename 



http://dovecot.org/list/dovecot/2007-April/021617.html

  

and/or the user's IP address.



Add %r to mail_log_prefix setting.

  


Thanks!


[Dovecot] mail_log plugin

2007-04-16 Thread Phillip T. George

Hello all,

Is there any way to add additional options for the mail_log plugin?  
Specifically, I'm wanting to make it so IMAP copy commands will show the 
source filename and/or the user's IP address.  Is this possible?  If 
there are docs for this info, feel free to point me to it.


-Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George

Robert Schetterer wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Phillip T. George schrieb:
  

Hello all,

Definitely congrats on the 1.0.0 release!

Anyway, I'm having a problem, that may or may not be related to
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails are
appearing.  These emails have exactly the same queue ID, so its not that
they were sent multiple times.  These dup emails do not show up to me ever.

Postfix is being used as the SMTP, and it hands it over to procmail.  I
set up procmail's verbose logging feature for that user and on the
duplicate emails that he receives, it shows only ONE write to a file for
that specific subject of email.  Tonight / this morning I'll be tracking
down to see if this duplicate for sure happens in IMAP.

Note: Its possible that part of the problem is he leaves two IMAP
clients open at the same time (Netscape I think).  I'm going to verify
that with him.

Any ideas?  I'm NOT trying to blame Dovecot, I'm just trying to explore
options.  Right now its looking fairly bad for Dovecot thoughI mean,
what else is there after the mail is delivered to the appropriate place
in the mailbox?

Software versions:
postfix 2.3.8
procmail 3.22
dovecot 1.0.rc28

Thanks,
Phillip



Hi Phillip,
this surely gets not to dovecot, my first tip goes to procmail
read
http://www.postfix.org/faq.html#duplicate
http://pm-doc.sourceforge.net/pm-tips-body.html search  Order of the
procmail recipes
use google duplicate procmail
after all you can double mails with filters like amavis, clamsmtp
therefor your have to include  -o
receive_override_options=no_address_mappings, in master cf in the filter
lines,
after all apple mail has long list of bug with imap with double emails
too, look at you mail log and you will find the reason
- --
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

https://www.schetterer.org
Munich/Bavaria/Germany
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGH+yxfGH2AvR16oERAnVIAJ9fRakXwcxXuLAB/+O2E2D18OoL3gCghoof
+IGwfVBgaiHnvbt0i3TQ3nU=
=BkSX
-END PGP SIGNATURE-

  

(Sorry Robert, I accidentally replied off-list to you)

Normally I'd agree with you, especially on the Procmail side, but I've 
already checked the logs.  I've also checked Postfix's logs.  These 
duplicate emails have the same exact ID.  Postfix shows handing the 
email over to Procmail.  Procmail only shows delivering to one file.  
The duplicates are not consistent ... they do not always occur.  
Probably about 10 dupes a day out of 400-500 emails.


I'll provide more information sometime between tomorrow and Monday.  I 
have coordinated a plan with the user so that I may scan the mailbox 
tomorrow morning to check for duplicates, while that user has all 
clients closed.  If the duplicates occur, then Dovecot is 100% off of 
the hook.  I really like Dovecot, so I feel sort of sick and evil for 
even wanting to assume it could do anything wrong :)


-Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George



Timo Sirainen wrote:

On Fri, 2007-04-13 at 09:10 -0500, Phillip T. George wrote:
  
Anyway, I'm having a problem, that may or may not be related to 
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails are 
appearing.  These emails have exactly the same queue ID, so its not that 
they were sent multiple times.  These dup emails do not show up to me ever.



What kind of filenames do they have in maildir? Do you see anything in
Dovecot's error logs? The only reason why Dovecot would internally
duplicate messages is if it detects multiple filenames with same base
name, which aren't hardlinks to each others. And that could happen if
the maildir filenames aren't truly unique. You said you're using
Procmail, are you sure you're not using MH filenames
(http://wiki.dovecot.org/MailboxFormat/Maildir)?

If that's not the problem, you can enable mail_log plugin and check if
it logs that the client does a duplicate COPY.
http://wiki.dovecot.org/Plugins/MailLog
  

Here's a snippet from the procmail log file:
procmail: Assigning 
"LASTFOLDER=/home/domain.com/homes/user/Maildir/new/1176426436.9170_1.east.domain.com"
procmail: Notified comsat: 
"[EMAIL PROTECTED]:/home/domain.com/homes/user/Maildir/new/1176426436.9170_1.east.domain.com"


I do not see any errors near the time the duplicate messages occurred.

In /etc/postfix/main.cf :
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail -a "$EXTENSION"

I'll try enabling the mail_log plugin.

Thanks,
Phillip



Re: [Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George

Charles Marcus wrote:

Phillip T. George wrote:

Hello all,

Definitely congrats on the 1.0.0 release!

Anyway, I'm having a problem, that may or may not be related to 
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails 
are appearing.  These emails have exactly the same queue ID, so its 
not that they were sent multiple times.  These dup emails do not show 
up to me ever.


What are you using for delivery?

It seems to me the only way this could be dovecot related is if you 
are using dovecot-deliver.


Am I wrong?



Charles,

Procmail is handling the final step of the delivery -- and it shows 
precisely one email going through, with one file being written.


-Phillip


Re: [Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George
The user's Maildir was transferred (as was mine) from another server 
running Courier.  The dovecot.* files were not deleted or moved.


-Phillip

Oliver Schulze L. wrote:

Have you done some migration latelly?
How about deleting/moving the dovecot.* files in the users Maildir 
forlder?


HTH
Oliver

Phillip T. George wrote:
Hmm.  Thats interesting.  The thing is, its only happening for one 
user that I'm aware of.  Also, I probably should of mentioned that 
I'm using Maildir ... I'm sure that changes things :)


-Phillip




Re: [Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George
Hmm.  Thats interesting.  The thing is, its only happening for one user 
that I'm aware of.  Also, I probably should of mentioned that I'm using 
Maildir ... I'm sure that changes things :)


-Phillip

Stewart Dean wrote:
When this happens with sendmail, it can be that the queue handler 
doesn't finish before a new queue handler is kicked off, so each 
successive queue handler/runner ends up sending the same mail.
Background: sendmail, and perhaps postfix, is configured to a) toss 
stuff it can't handle right away into the queue and then, every so 
often (interval to be set by admin), it burps the queue.  If the 
interval is too short, the previous queue handler/runner doesn't 
complete before a new one is invoked and gets it list of things to 
mail...with the same email on both queue handler/runners incarnations 
to do list...


Phillip T. George wrote:

Hello all,

Definitely congrats on the 1.0.0 release!

Anyway, I'm having a problem, that may or may not be related to 
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails 
are appearing.  These emails have exactly the same queue ID, so its 
not that they were sent multiple times.  These dup emails do not show 
up to me ever.


Postfix is being used as the SMTP, and it hands it over to procmail.  
I set up procmail's verbose logging feature for that user and on the 
duplicate emails that he receives, it shows only ONE write to a file 
for that specific subject of email.  Tonight / this morning I'll be 
tracking down to see if this duplicate for sure happens in IMAP.


Note: Its possible that part of the problem is he leaves two IMAP 
clients open at the same time (Netscape I think).  I'm going to 
verify that with him.


Any ideas?  I'm NOT trying to blame Dovecot, I'm just trying to 
explore options.  Right now its looking fairly bad for Dovecot 
thoughI mean, what else is there after the mail is delivered to 
the appropriate place in the mailbox?


Software versions:
postfix 2.3.8
procmail 3.22
dovecot 1.0.rc28

Thanks,
Phillip




[Dovecot] Duplicate E-mail Problem

2007-04-13 Thread Phillip T. George

Hello all,

Definitely congrats on the 1.0.0 release!

Anyway, I'm having a problem, that may or may not be related to 
Dovecot.  Specifically, duplicate (and sometimes triplicate) emails are 
appearing.  These emails have exactly the same queue ID, so its not that 
they were sent multiple times.  These dup emails do not show up to me ever.


Postfix is being used as the SMTP, and it hands it over to procmail.  I 
set up procmail's verbose logging feature for that user and on the 
duplicate emails that he receives, it shows only ONE write to a file for 
that specific subject of email.  Tonight / this morning I'll be tracking 
down to see if this duplicate for sure happens in IMAP.


Note: Its possible that part of the problem is he leaves two IMAP 
clients open at the same time (Netscape I think).  I'm going to verify 
that with him.


Any ideas?  I'm NOT trying to blame Dovecot, I'm just trying to explore 
options.  Right now its looking fairly bad for Dovecot thoughI mean, 
what else is there after the mail is delivered to the appropriate place 
in the mailbox?


Software versions:
postfix 2.3.8
procmail 3.22
dovecot 1.0.rc28

Thanks,
Phillip