On 6/06/2019 6:50 am, Gilles Chehade wrote:
On Mon, Jun 03, 2019 at 05:44:41PM +0000, Benny wrote:
Hi,
Hi,
I am planning a mail server of opensmtpd and dovecot. I'd be glad to know if there is any
way to save a copy of mail to dovecot's "Sent" mail box before relaying them
out.
sorry, I don't know dovecot enough for tricks and hacks.
it's possible that it's doable through some weird trick when smtpd would
notify dovecot somehow of messages that were sent, but I doubt it and it
is generally the mail user agent that does the link between mails it did
send over SMTP and copies it stores through IMAP.
I am also not about find any docs on opensmtpd-extra-pgsql. Is there any guide
to link postgresql up with smtpd for virtual users?
There's a man page but no guide no.
There are several tutorials for using SQLite and MySQL if you google and
they are pretty much identical in terms of configuration.
Hi Benny.
I use Cyrus and Postgresql with smtpd. Everything you need for virtual
users is in table-sqlite(5), but you will
want to use IDENTITY or SERIAL for the ID column. (There is a man page
for table-postgres(5) in the source,
but it isn't installed)
I can't speak for Dovecot. But I use LMTP to deliver locally to the
cyrus mailer. Two actions are needed (below)
to route to the local mail store. <aliases> is /etc/mail/aliases,
<virtuals> is the database table.
# incoming email
action "cyrus" lmtp "127.0.0.1:2003" rcpt-to virtual <virtuals>
# locally generated email (system /etc/mail/aliases - alias root to a
some...@your.local.domain.com)
action "cyrus_internal" lmtp "127.0.0.1:2003" rcpt-to alias <aliases>
match from local for local action "cyrus_internal"
match from any for domain <domains> action "cyrus"