PostgreSQL+Postfix+Nginx+PHP+RoundCube+Dovecot+ SpamAssassin+Clamav+Spamd

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

graudeejs said:
Do you have user (or alias) www in database?
Nope. this is my only user with two aliases
Code:
-- create user
INSERT INTO mailbox VALUES ('3rr0r','babaei.net','{#############################}');

-- create virtual aliases
INSERT INTO mailbox_aliases VALUES ('postmaster@babaei.net', '3rr0r', 'babaei.net');
INSERT INTO mailbox_aliases VALUES ('root@babaei.net', '3rr0r', 'babaei.net');
 

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

Delivery failure report by gmail

Code:
This is an automatically generated Delivery Status Notification

THIS IS A WARNING MESSAGE ONLY.

YOU DO NOT NEED TO RESEND YOUR MESSAGE.

Delivery to the following recipient has been delayed:

     root@babaei.net

Message will be retried for 2 more day(s)

Technical details of temporary failure:
The recipient server did not accept our requests to connect. Learn more at 
http://support.google.com/mail/bin/answer.py?answer=7720
[(10) mx.babaei.net. [199.48.133.134]:25: Connection dropped]
[(10) mail.babaei.net. [199.48.133.134]:25: Connection dropped]
 
OP
OP
graudeejs

graudeejs

Son of Beastie

Thanks: 686
Messages: 4,611

NuLL3rr0r said:
Nope. this is my only user with two aliases
Code:
-- create user
INSERT INTO mailbox VALUES ('3rr0r','babaei.net','{#############################}');

-- create virtual aliases
INSERT INTO mailbox_aliases VALUES ('postmaster@babaei.net', '3rr0r', 'babaei.net');
INSERT INTO mailbox_aliases VALUES ('root@babaei.net', '3rr0r', 'babaei.net');
I think you need to
Code:
INSERT INTO mailbox_aliases VALUES ('www@babaei.net', '3rr0r', 'babaei.net');
P.S. I'm rusty on this. I don't have my own server for about year or so
 

NuLL3rr0r

Active Member

Thanks: 14
Messages: 174

Hi graudeejs,

tnx for the answer. I added www to mailbox_aliases. To check if it's added:
[CMD=""]SELECT * FROM mailbox_aliases;[/CMD]
Code:
        address        | dest_username | dest_domain | active
-----------------------+---------------+-------------+--------
 postmaster@babaei.net | 3rr0r         | babaei.net  | t
 root@babaei.net       | 3rr0r         | babaei.net  | t
 www@babaei.net        | 3rr0r         | babaei.net  | t
(3 rows)
Still www is unknown user:
Code:
Aug 18 20:13:12 3rr0r postfix/smtpd[1543]: connect from mail-bk0-
f44.google.com[209.85.214.44]
Aug 18 20:14:00 3rr0r postfix/pickup[99224]: 1726BBA48: uid=80 from=<www>
Aug 18 20:14:00 3rr0r postfix/cleanup[85682]: 1726BBA48: message-id=<20120818201400.1726BBA48@babaei.net>
Aug 18 20:14:00 3rr0r postfix/qmgr[30223]: 1726BBA48: from=<www@babaei.net>, size=501, 
nrcpt=1 (queue active)
Aug 18 20:14:00 3rr0r dovecot: auth(default): prefetch(3rr0r@babaei.net): userdb lookup not 
possible with only userdb prefetch
Aug 18 20:14:00 3rr0r postfix/pipe[69649]: 1726BBA48: to=<3rr0r@babaei.net>, orig_to=<www>, 
relay=dovecot, delay=0.03, delays=0.01/0.01/0/0, dsn=5.1.1, status=bounced (user unknown)
Aug 18 20:14:00 3rr0r postfix/cleanup[95668]: 1CD9BBACA: message-id=
<20120818201400.1CD9BBACA@babaei.net>
Aug 18 20:14:00 3rr0r postfix/bounce[99157]: 1726BBA48: sender non-delivery notification: 
1CD9BBACA
Aug 18 20:14:00 3rr0r postfix/qmgr[30223]: 1CD9BBACA: from=<>, size=2168, nrcpt=1 (queue 
active)
Aug 18 20:14:00 3rr0r postfix/qmgr[30223]: 1726BBA48: removed
Aug 18 20:14:00 3rr0r dovecot: auth(default): prefetch(3rr0r@babaei.net): userdb lookup not 
possible with only userdb prefetch
Aug 18 20:14:00 3rr0r postfix/pipe[69652]: 1CD9BBACA: to=<3rr0r@babaei.net>, orig_to=
<www@babaei.net>, relay=dovecot, delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced 
(user unknown)
Aug 18 20:14:00 3rr0r postfix/qmgr[30223]: 1CD9BBACA: removed
Maybe I did something wrong. I'll try to do it from the begging to see what happens.
 

Cthulhux

Active Member

Thanks: 76
Messages: 208

Not sure if I made some mistake...

I own the mail address root@somedomain.org which runs on FreeBSD 9.1. I copied and pasted the commands to create the cert.pem and key.pem files and entered somedomain.org when it asked for "my name". Then I added the cert.pem certificate to my MUA.

Still it fails to fetch mails:

Code:
Apr  9 22:06:59 [i]servername[/i] dovecot: imap-login: Disconnected (no auth attempts): rip=91.11.9.88, lip=46.38.239.230, TLS handshaking: SSL_accept() failed: error:14094419:SSL routines:SSL3_READ_BYTES:tlsv1 alert access denied
According to my MUA log, the domain does not match.

What has gone wrong here?
 
OP
OP
graudeejs

graudeejs

Son of Beastie

Thanks: 686
Messages: 4,611

I haven't done this for quite a while now, But depending on your config, perhaps you needed to type

Code:
*.somedomain.org
just a guess.
If I remember correctly, this allows you to have subdomains, which you probably have (main.somedomain.org ?)
 

cr4sh

Member

Thanks: 3
Messages: 35

If anyone needs to add BCC incoming/outgoing mails in this system.
main.cf
Code:
recipient_bcc_maps = pgsql:/usr/local/etc/postfix/pgsql_recipient_bcc_maps.cf
/usr/local/etc/postfix/pgsql_recipient_bcc_maps.cf
Code:
user = postfix
password = passsffffooorrrttt 
hosts = /tmp:5433
dbname = mail
query = SELECT address_bcc FROM mailbox_bcc WHERE address_to = '%s' AND active = true;
PostgreSQL code:

Code:
CREATE TABLE mailbox_bcc (
address_to VARCHAR(128) NOT NULL,
address_bcc VARCHAR(128) NOT NULL,
active BOOLEAN DEFAULT true NOT NULL
);

GRANT SELECT ON mailbox_bcc TO postfix;
address_to - mail address person that we want to forward mails
address_bcc - mail address where copy will be sent
Use only real accounts, not aliases.
 

cbrace

Active Member

Thanks: 6
Messages: 234

@cr4sh: I'd be happy to help out with dspam. My configuration is pretty standard:

This line in /usr/local/etc/postfix/master.cf:
Code:
smtp      inet  n       -       n       -       -       smtpd
           -o content_filter=lmtp:unix:/var/run/dspam.sock
How far have you gotten? What seems to be the problem?
 
Last edited by a moderator:

cr4sh

Member

Thanks: 3
Messages: 35

cbrace said:
@cr4sh: I'd be happy to help out with dspam. My configuration is pretty standard:

This line in /usr/local/etc/postfix/master.cf:
Code:
smtp      inet  n       -       n       -       -       smtpd
           -o content_filter=lmtp:unix:/var/run/dspam.sock
How far have you gotten? What seems to be the problem?
Thanks for fast reply. Can you add your dspam configuration? I have problems with adding dspam to configuration from this topic.

Best regards.
 
Last edited by a moderator:
Top