Re: Email Server Backup Strategy

2020-02-09 Thread Durga Prasad Malyala
On Sun, Feb 9, 2020, 23:38 Andrew McGlashan <
andrew.mcglas...@affinityvision.com.au> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Hi,
>
> On 10/2/20 4:59 am, Francis Augusto Medeiros-Logeay wrote:
> > What I do:
> >
> > 1 - I ran a maildirlock command to my mail folder 2 - I then rsync
> > the folder where my maildirs are, as well as the indexes, to a
> > remote location
>
> If rsync is not fast... then how about doing a snapshot and then rsync
> off the snapshot?  (I do rsync over lvm snapshots to back up file
> systems cleanly) and, btw, perform file system dumps [ufsdump /
> ufsrestore like, but dump and restore on Linux] of *non-mounted*
> backup file systems fwiw.
>
> I have other rsyncs that happen via rsnapshot during the day, I don't
> worry about snapshotting them though, but I probably should
>
> > 3 - I tar.gz the daily backup 4 - I kill the maildirlock process
> >
> > I also use replication of my server so that I keep getting mail
> > when my main server isn't available.
>
> You mean backup mx?
>
> > As for postfix, I backup the database once a week, since it doesn't
> > get changed that often.
> >
> > Hope that helps!
> >
> > Best,
> >
> > Francis
> >
> >
> >
> >
> > On 09.02.2020 18:26, Esteban L wrote:
> >> Hello,
> >>
> >> Was thinking it would be wise to backup my server, in case
> >> anything "bad" ever happened, so that I could quickly get up to
> >> speed.
> >>
> >> 1. clone the whole drive -- which might be the best to ensure I
> >> keep the whole system working.
> >>
> >> 2. But, what about, if I just wanted to backup my Email server
> >> components? Postfix - which I think is just config files, and
> >> Dovecot - I think there is a doveadm backup for doing such
> >> things.
> >>
> >> What do you guys do, recommend for backups??
> >>
> >> Thanks
>
> Cheers
>
> - --
> Andrew McGlashan
>
> -BEGIN PGP SIGNATURE-
>
> iHUEAREIAB0WIQTJAoMHtC6YydLfjUOoFmvLt+/i+wUCXkBKkAAKCRCoFmvLt+/i
> +811AQCmzZtw7SLsKHi9bNybOtsuQwT/qqZ9GppCXJWAtRYzkQD+M3ZlXR6v3g9U
> 5Px4Aayix3mQyil0q7MZIYpNyrBWEjw=
> =YOGn
> -END PGP SIGNATURE-
>

What do you guys do to backup mdbox mails with SiS enabled?
DP

>


Re: Email Server Backup Strategy

2020-02-09 Thread Daniel Shahaf
Esteban L wrote on Sun, 09 Feb 2020 18:26 +0100:
> 2. But, what about, if I just wanted to backup my Email server
> components? Postfix - which I think is just config files, and Dovecot -
> I think there is a doveadm backup for doing such things.

For postfix you should also back up the mail queue (e.g., messages that
couldn't be delivered the first time and await further delivery
attempts).  See `postconf data_directory` and/or `postconf
queue_directory`.


How to configure mail-filter plugin

2020-02-09 Thread ??????
I config mail-filter plugin like https://wiki2.dovecot.org/Plugins/MailFilter 
describe?? but error occurred

mail-filter plugin config in dovecot.conf:
mail_plugins = mail_filter
plugin {
  mail_filter = mail-filter %u # %u = username given to the script as first
  mail_filter_out = mail-filter-out %u
}

service mail-filter {
  executable = script /usr/local/bin/mail-filter.sh
  user = vmail
  group = vmail
  unix_listener mail-filter {
mode = 0666
user = vmail
group = vmail
  }
}

service mail-filter-out {
 executable = script /usr/local/bin/mail-filter-out.sh
 user = vmail
 group = vmail
 unix_listener mail-filter-out {
   mode = 0666
   user = vmail
   group = vmail
 }
}

vim  /usr/local/bin/mail-filter.sh
touch /tmp/testfile
cat  >  /tmp/tempfile
cat /tmp/tempfile


vim /usr/local/bin/mail-filter-out.sh
cat > /tmp/tempfile
cat /tmp/tempfile

then "dovecot-lda -f q...@a.com -d q...@a.com < test.eml"
Error log:
Feb 10 10:00:21 lda(q...@a.com)<18794><9ZN8EzW5QF5qSQAA0J78UA>: Debug: 
Namespace : Using permissions from /home/a.com/q1: mode=0700 gid=default
Feb 10 10:00:21 lda(q...@a.com)<18794><9ZN8EzW5QF5qSQAA0J78UA>: Panic: file 
ostream.c: line 201 (o_stream_flush): assertion failed: (stream->stream_errno 
!= 0)
Feb 10 10:00:21 lda(q...@a.com)<18794><9ZN8EzW5QF5qSQAA0J78UA>: Error: Raw 
backtrace: /usr/lib64/dovecot/libdovecot.so.0(backtrace_append+0x42) 
[0x7f049f4ef582] -> /usr/lib64/dovecot/libdovecot.so.0(backtrace_get+0x1e) 
[0x7f049f4ef68e] -> /usr/lib64/dovecot/libdovecot.so.0(+0xe4b6e) 
[0x7f049f4f9b6e] -> /usr/lib64/dovecot/libdovecot.so.0(+0xe4bb1) 
[0x7f049f4f9bb1] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7f049f4565e8] -> /usr/lib64/dovecot/libdovecot.so.0(+0x10bc47) 
[0x7f049f520c47] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(dbox_save_end+0x35) [0x7f049f8262f5] 
-> /usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_save_finish+0x39) 
[0x7f049f81af99] -> /usr/lib64/dovecot/libdovecot-lda.so.0(+0x3fbe) 
[0x7f049fb0efbe] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_save_finish+0x73) 
[0x7f049f801493] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_storage_copy+0xc9) 
[0x7f049f7f38e9] -> /usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_copy+0x46) 
[0x7f049f81b816] -> /usr/lib64/dovecot/libdovecot-lda.so.0(+0x3daa) 
[0x7f049fb0edaa] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0x4e87c) 
[0x7f049f80187c] -> 
/usr/lib64/dovecot/libdovecot-lda.so.0(mail_deliver_save+0x1d7) 
[0x7f049fb103e7] -> /usr/lib64/dovecot/libdovecot-lda.so.0(mail_deliver+0x2fe) 
[0x7f049fb10bfe] -> /usr/libexec/dovecot/dovecot-lda(main+0x615) 
[0x55f636880045] -> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f049f073c05] 
-> /usr/libexec/dovecot/dovecot-lda(+0x3b7e) [0x55f636880b7e]

Re: Email Server Backup Strategy

2020-02-09 Thread Andrew McGlashan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

On 10/2/20 4:59 am, Francis Augusto Medeiros-Logeay wrote:
> What I do:
>
> 1 - I ran a maildirlock command to my mail folder 2 - I then rsync
> the folder where my maildirs are, as well as the indexes, to a
> remote location

If rsync is not fast... then how about doing a snapshot and then rsync
off the snapshot?  (I do rsync over lvm snapshots to back up file
systems cleanly) and, btw, perform file system dumps [ufsdump /
ufsrestore like, but dump and restore on Linux] of *non-mounted*
backup file systems fwiw.

I have other rsyncs that happen via rsnapshot during the day, I don't
worry about snapshotting them though, but I probably should

> 3 - I tar.gz the daily backup 4 - I kill the maildirlock process
>
> I also use replication of my server so that I keep getting mail
> when my main server isn't available.

You mean backup mx?

> As for postfix, I backup the database once a week, since it doesn't
> get changed that often.
>
> Hope that helps!
>
> Best,
>
> Francis
>
>
>
>
> On 09.02.2020 18:26, Esteban L wrote:
>> Hello,
>>
>> Was thinking it would be wise to backup my server, in case
>> anything "bad" ever happened, so that I could quickly get up to
>> speed.
>>
>> 1. clone the whole drive -- which might be the best to ensure I
>> keep the whole system working.
>>
>> 2. But, what about, if I just wanted to backup my Email server
>> components? Postfix - which I think is just config files, and
>> Dovecot - I think there is a doveadm backup for doing such
>> things.
>>
>> What do you guys do, recommend for backups??
>>
>> Thanks

Cheers

- -- 
Andrew McGlashan

-BEGIN PGP SIGNATURE-

iHUEAREIAB0WIQTJAoMHtC6YydLfjUOoFmvLt+/i+wUCXkBKkAAKCRCoFmvLt+/i
+811AQCmzZtw7SLsKHi9bNybOtsuQwT/qqZ9GppCXJWAtRYzkQD+M3ZlXR6v3g9U
5Px4Aayix3mQyil0q7MZIYpNyrBWEjw=
=YOGn
-END PGP SIGNATURE-


0xA8166BCBB7EFE2FB.asc
Description: application/pgp-keys


Re: Email Server Backup Strategy

2020-02-09 Thread Francis Augusto Medeiros-Logeay

What I do:

1 - I ran a maildirlock command to my mail folder
2 - I then rsync the folder where my maildirs are, as well as the 
indexes, to a remote location

3 - I tar.gz the daily backup
4 - I kill the maildirlock process

I also use replication of my server so that I keep getting mail when my 
main server isn't available.


As for postfix, I backup the database once a week, since it doesn't get 
changed that often.


Hope that helps!

Best,

Francis




On 09.02.2020 18:26, Esteban L wrote:

Hello,

Was thinking it would be wise to backup my server, in case anything
"bad" ever happened, so that I could quickly get up to speed.

1. clone the whole drive -- which might be the best to ensure I keep 
the

whole system working.

2. But, what about, if I just wanted to backup my Email server
components? Postfix - which I think is just config files, and Dovecot -
I think there is a doveadm backup for doing such things.

What do you guys do, recommend for backups??

Thanks

0xEE41D33F.asc
Description: application/pgp-keys


Email Server Backup Strategy

2020-02-09 Thread Esteban L
Hello,

Was thinking it would be wise to backup my server, in case anything
"bad" ever happened, so that I could quickly get up to speed.

1. clone the whole drive -- which might be the best to ensure I keep the
whole system working.

2. But, what about, if I just wanted to backup my Email server
components? Postfix - which I think is just config files, and Dovecot -
I think there is a doveadm backup for doing such things.

What do you guys do, recommend for backups??

Thanks


-- 
https://www.little-beak.com
"Doing what we can."