But, I have three public domains and one local domain.
My local domain sends outgoing mail, but can not receive mail from the Internet.
How to restrict users from local domain email sent only to the local domain, not on the internet.
Thanks
Hi Admin
Thanks for the reply.
I've made the settings, but the situation is as follows: my user to the local domain can send email to internet but can not send another user on the local domain.
I am want to set the user from the local domain sends only your domain, without the possibility of sending mail to the public domain on the Internet.
The situation is the opposite of the one I wanted ….
The first line says check the sender access, if mail is from acme.local, use the local_only restriction class
The second line declares a local_only restriction class
The third lines says local_only is set to accept mails to acme.local only, reject all others
In sender_access
everything is set according to instructions, but still not working ….
I have three virtual domain, which is administered through PostfixAdmin. My relay domain is the local domain, which is set in the hostname (mail.local.domain)
-rw-r–r– 1 root root 23 May 18 13:43 sender_access
-rw-r–r– 1 root root 15 May 18 13:44 local_domains
-rw-r–r– 1 root root 12K May 18 13:44 local_domains.db
-rw-r–r– 1 root root 12K May 18 13:44 sender_access.db When everything is set up by your guide, users with local domain can send mail outside your domain, and the user from the public domain can not send or receive mail.
The local virtual user still send outgoing e-mails to the public domain on the Internet, but other users with local domain does not receive e-mails from him.
My log file at the time of sending mail to the following:
May 19 13:35:13 mail dovecot: imap-login: Login: user=<test1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
May 19 13:35:13 mail dovecot: IMAP(test1): Disconnected: Logged out bytes=71/791
May 19 13:35:21 mail MailScanner[1324]: Requeue: C1C7E570344.A49C3 to E78B9570340
May 19 13:35:21 mail MailScanner[1324]: Uninfected: Delivered 1 messages
May 19 13:35:21 mail postfix/qmgr[19977]: E78B9570340: from=<test1@local.domain>, size=798, nrcpt=4 (queue active)
May 19 13:35:21 mail MailScanner[1324]: Deleted 1 messages from processing-database
May 19 13:35:21 mail MailScanner[1324]: MailScanner child dying of old age
0.44, dsn=2.6.0, status=sent (250 2.6.0 <1811.10.29.35.32.1274268900.squirrel@mail.local.domain> Queued mail for delivery)
r domain name not found. Name service error for name=local.domain type=A: Host not found)
=2.0.0, status=sent (250 ok 1274269170 qp 31020)
=sent (delivered to maildir)
May 19 13:35:22 mail postfix/cleanup[21158]: AC312570345: message-id=<20100519113522.AC312570345@mail.local.domain>
May 19 13:35:23 mail postfix/qmgr[19977]: AC312570345: from=<>, size=3116, nrcpt=1 (queue active)
May 19 13:35:23 mail postfix/bounce[21195]: E78B9570340: sender non-delivery notification: AC312570345
May 19 13:35:23 mail postfix/qmgr[19977]: E78B9570340: removed
May 19 13:35:23 mail MailScanner[21192]: MailScanner E-Mail Virus Scanner version 4.79.11 starting…
or domain name not found. Name service error for name=carina.corp type=A: Host not found)
May 19 13:35:23 mail postfix/qmgr[19977]: AC312570345: removed
May 19 14:17:34 mail dovecot: imap-login: Login: user=<test1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
May 19 14:17:35 mail MailScanner[21192]: Requeue: E2D2A570344.A4692 to 1EA0C570340
May 19 14:17:35 mail MailScanner[21192]: Uninfected: Delivered 1 messages
May 19 14:17:35 mail postfix/qmgr[22280]: 1EA0C570340: from=<test1@local.domain>, size=685, nrcpt=2 (queue active)
May 19 14:17:35 mail MailScanner[21192]: Deleted 1 messages from processing-database
May 19 14:17:35 mail postfix/smtp[22795]: 1EA0C570340: to=<test2@local.domain>, relay=none, delay=1.5, delays=1.4/0.1/0.02/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=carilocal.domain type=A: Host not found)
May 19 14:17:35 mail postfix/smtp[22794]: 1EA0C570340: to=<dacky@public.domain>, relay=smtp2.gov.me[195.66.167.7]:25, delay=2, delays=1.4/0.1/0.06/0.44, dsn=2.6.0, status=sent (250 2.6.0 1233.10.29.35.32.1274271453.squirrel@mail.loca.domain Queued mail for delivery)
May 19 14:17:35 mail postfix/cleanup[22782]: D1016570345: message-id=20100519121735.D1016570345@mail.local.domain
Next, remove permit_mynetworks in smtpd_recipient_restrictions and restart MailScanner.
Now test sending out email. If you are using SquirrelMail to test, note that it is sending mail using mail.local.domain so you have to correct it first.
Now test sending out email. If you are using SquirrelMail to test, note that it is sending mail using mail.local.domain so you have to correct it first.
You have to configure SquirrelMail first. From that point onwards, new accounts will use the configured domain name. But accounts already existing in SquirrelMail should be corrected manually by the user themselves since it saved the old domain name.