[SOLVED] How to restrict users to send mail to outside domains
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You can put a non-existent host in the smtproutes file, so when qmail tries to deliver a message that is not local it fails with a "permanent error"
You may also use queuelifetime to specify the time (e.g. 600) that the message stays in queue before it bounces back (default is 1 week)
You don't pay much attention to replies.
I've already told you, that you need to specify a small amount time in /var/qmail/control/queuelifetime, so yo don't have to wait a week to get the bounce back message.
I don't know what you did, but I've just tested with a queuelifetime of 60sec and it worked, as you can see:
2011-06-11 11:10:26.242030500 new msg 4793211
2011-06-11 11:10:26.242033500 info msg 4793211: bytes 510 from <firstname.lastname@example.org> qp 2867 uid 1000
2011-06-11 11:10:26.294100500 starting delivery 32: msg 4793211 to remote XXXXX@gmail.com
2011-06-11 11:10:26.294102500 status: local 0/10 remote 1/20
2011-06-11 11:10:29.301976500 delivery 32: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
2011-06-11 11:10:29.301979500 status: local 0/10 remote 0/20
2011-06-11 11:17:07.348944500 starting delivery 33: msg 4793211 to remote XXXXX@gmail.com
2011-06-11 11:17:07.348947500 status: local 0/10 remote 1/20
2011-06-11 11:17:10.358305500 delivery 33: failure: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/I'm_not_going_to_try_again;_this_message_has_been_in_the_queue_too_long./
2011-06-11 11:17:10.358309500 status: local 0/10 remote 0/20
2011-06-11 11:17:10.473097500 bounce msg 4793211 qp 2911
2011-06-11 11:17:10.473100500 end msg 4793211
2011-06-11 11:17:10.473648500 new msg 4793225
2011-06-11 11:17:10.473650500 info msg 4793225: bytes 1146 from <> qp 2911 uid 1008
2011-06-11 11:17:10.540737500 starting delivery 34: msg 4793225 to local email@example.com
2011-06-11 11:17:10.540740500 status: local 1/10 remote 0/20
2011-06-11 11:17:21.034665500 delivery 34: success: did_1+0+1/
2011-06-11 11:17:21.034668500 status: local 0/10 remote 0/20
2011-06-11 11:17:21.035031500 end msg 4793225
AFAIK qmail tries for the first time to send the message and then retries (every 5mins?) until the queuelifetime expires. Then tries for a last time and bounces back the mail.
Even though there is no need to restart qmail, try to restart it and test to see what happens
i kept 200 in /var/qmail/control/queuelifetime, and restart but still not get bounce back i will baunce back after 1 week which is default values i think qmail not take value from queuelifetime need to edit any other files??