Re: stupid question about sendmail
On 24 May 2013 08:34, "Wojciech Puchar" wrote: > > how to redirect recipient address. i mean - if someone try to send to x...@y.pl from serwer then it should be redirected to local account, while the rest of mails to domain @y.pl should get out normally. > > alternatively outgoing mail to x...@y.pl should be rejected. > > > tried access.db - > > To:x...@y.pl REJECT > > doesn't work > > > any idea. thank you Try a sendmail list? Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 09:33+0200, Wojciech Puchar wrote: > how to redirect recipient address. i mean - if someone try to send to > x...@y.pl > from serwer then it should be redirected to local account, while the rest of > mails to domain @y.pl should get out normally. > > alternatively outgoing mail to x...@y.pl should be rejected. > > tried access.db - > > To:x...@y.pl REJECT > > doesn't work > > any idea. thank you Don't use /etc/mail/access, use /etc/mail/aliases. E.g.: x: /dev/null -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
To:x...@y.pl REJECT doesn't work any idea. thank you Don't use /etc/mail/access, use /etc/mail/aliases. E.g.: x: /dev/null x is NOT on my server. it will not work. all i want is when someone send a mail from my server to x...@y.pl (which is someone else domain) it will not get there and be blocked or redirected ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 09:55+0200, Wojciech Puchar wrote: > > > > > > To:x...@y.pl REJECT > > > > > > doesn't work > > > > > > any idea. thank you > > > > Don't use /etc/mail/access, use /etc/mail/aliases. > > > > E.g.: > > > > x: /dev/null > > x is NOT on my server. it will not work. > > all i want is when someone send a mail from my server to x...@y.pl (which is > someone else domain) it will not get there and be blocked or redirected My bad, take a look at the /etc/mail/genericstable file: http://www.sendmail.com/sm/open_source/docs/m4/features.html Maybe a line like this one will help you achieve your goal: j...@bar.comerror:5.7.0:550 Address invalid -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 10:19+0200, Trond Endrestøl wrote: > My bad, take a look at the /etc/mail/genericstable file: > > http://www.sendmail.com/sm/open_source/docs/m4/features.html > > Maybe a line like this one will help you achieve your goal: > > j...@bar.com error:5.7.0:550 Address invalid I was wrong again, sorry, but I believe I got it right this time: 1. Edit the /etc/mail/access file. 2. Insert a line like this one: To:mail...@some.domain.tld REJECT 3. Save the /etc/mail/access file. 4. Change to the /etc/mail directory if not already there. 5. Run the make command to update the /etc/mail/access.db. 6. Try to send email to the blacklisted recipient. 7. If successful, the sender should recieve: reason: 550 5.2.1 ... Mailbox disabled for this recipient -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
all i want is when someone send a mail from my server to x...@y.pl (which is someone else domain) it will not get there and be blocked or redirected My bad, take a look at the /etc/mail/genericstable file: http://www.sendmail.com/sm/open_source/docs/m4/features.html Maybe a line like this one will help you achieve your goal: j...@bar.comerror:5.7.0:550 Address invalid i tried it. maybe i do something wrong but tried on my home server woj...@3miasto.net.pl error:5.7.0:550 Address invalid (TAB separates fields) in /etc/mail/genericstable and FEATURE(`genericstable') in wojtek.tensor.gdynia.pl.mc did make make install /etc/rc.d/sendmail restart and tried to send mail to woj...@3miasto.net.pl mail is not blocked any more ideas? thank you! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
http://www.sendmail.com/sm/open_source/docs/m4/features.html Maybe a line like this one will help you achieve your goal: j...@bar.comerror:5.7.0:550 Address invalid I was wrong again, sorry, but I believe I got it right this time: 1. Edit the /etc/mail/access file. 2. Insert a line like this one: To:mail...@some.domain.tld REJECT tried too. doesn't work. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On 24 May 2013 11:05, "Wojciech Puchar" wrote: >>> >>> >>> http://www.sendmail.com/sm/open_source/docs/m4/features.html >>> >>> Maybe a line like this one will help you achieve your goal: >>> >>> j...@bar.com error:5.7.0:550 Address invalid >> >> >> I was wrong again, sorry, but I believe I got it right this time: >> >> 1. Edit the /etc/mail/access file. >> >> 2. Insert a line like this one: >> >> To:mail...@some.domain.tld REJECT > > > tried too. > > doesn't work. > http://www.sendmail.com/sm/open_source/support/public_forums/ There is also an IRC channel, #sendmail on Freenode. Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 12:03+0200, Wojciech Puchar wrote: > > 1. Edit the /etc/mail/access file. > > > > 2. Insert a line like this one: > > > > To:mail...@some.domain.tld REJECT > > tried too. > > doesn't work. Make sure you edit the /etc/mail/access file, not the /etc/mail/access.db file. The latter is a hashmap used by sendmail for rapid lookup. The former is the source used to generate the /etc/mail/access.db file. Sendmail will never read the /etc/mail/access file. Don't forget to run the make command afterwards to update the /etc/mail/access.db file, and other changed files. Your .mc file must contain this line exactly as shown: FEATURE(access_db, `hash -o -T /etc/mail/access') Yes, sendmail will indeed access the /etc/mail/access.db file, not the /etc/mail/access file. If you changed the .mc file, then install the corresponding .cf files using the make install command. -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 12:45+0200, Trond Endrestøl wrote: > On Fri, 24 May 2013 12:03+0200, Wojciech Puchar wrote: > > > > 1. Edit the /etc/mail/access file. > > > > > > 2. Insert a line like this one: > > > > > > To:mail...@some.domain.tld REJECT > > > > tried too. > > > > doesn't work. > > Make sure you edit the /etc/mail/access file, not the > /etc/mail/access.db file. > > The latter is a hashmap used by sendmail for rapid lookup. The former > is the source used to generate the /etc/mail/access.db file. > > Sendmail will never read the /etc/mail/access file. > > Don't forget to run the make command afterwards to update the > /etc/mail/access.db file, and other changed files. > > Your .mc file must contain this line exactly as shown: > > FEATURE(access_db, `hash -o -T /etc/mail/access') > > Yes, sendmail will indeed access the /etc/mail/access.db file, not the > /etc/mail/access file. > > If you changed the .mc file, then install the corresponding .cf files > using the make install command. One final(?) note: You might need this line as well: FEATURE(blacklist_recipients) -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, May 24, 2013, Trond Endrest?l wrote: [freebsd-hackers doesn't seem like the appropriate list...] > > FEATURE(access_db, `hash -o -T /etc/mail/access') Do NOT use -o. Moreover, do not specify arguments that are default. FEATURE(`access_db') is the best choice. > One final(?) note: You might need this line as well: > FEATURE(blacklist_recipients) That's not a "might", that's a "MUST" for this case. Note: (sendmail's) cf/README is a rather useful document. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, 24 May 2013 08:34-0700, Claus Assmann wrote: > On Fri, May 24, 2013, Trond Endrestøl wrote: > > [freebsd-hackers doesn't seem like the appropriate list...] > > > > FEATURE(access_db, `hash -o -T /etc/mail/access') > > Do NOT use -o. Moreover, do not specify arguments that are default. > FEATURE(`access_db') > is the best choice. Then I guess the defaults in freebsd.mc should be changed as well: http://svnweb.freebsd.org/base/stable/9/etc/sendmail/freebsd.mc?revision=249867&view=markup > > One final(?) note: You might need this line as well: > > > FEATURE(blacklist_recipients) > > That's not a "might", that's a "MUST" for this case. > > Note: (sendmail's) cf/README is a rather useful document. Thank you for the clarification. I only hope our friend in Poland got what he needed. -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
On Fri, May 24, 2013, Trond Endrest?l wrote: > On Fri, 24 May 2013 08:34-0700, Claus Assmann wrote: > > > > FEATURE(access_db, `hash -o -T /etc/mail/access') > > Do NOT use -o. Moreover, do not specify arguments that are default. > Then I guess the defaults in freebsd.mc should be changed as well: > http://svnweb.freebsd.org/base/stable/9/etc/sendmail/freebsd.mc?revision=249867&view=markup That default was probably chosen so the MTA does not complain if the map doesn't exist. Of course that doesn't work so well if you really want to use the map but make some mistake -- then an error is silently ignored and you wonder "Why doesn't this work?" Hence for this case: do NOT use -o. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: stupid question about sendmail
works fine after your advice. thank you very much. FEATURE(`access_db') FEATURE(`blacklist_recipients') On Fri, 24 May 2013, Claus Assmann wrote: On Fri, May 24, 2013, Trond Endrest?l wrote: [freebsd-hackers doesn't seem like the appropriate list...] FEATURE(access_db, `hash -o -T /etc/mail/access') Do NOT use -o. Moreover, do not specify arguments that are default. FEATURE(`access_db') is the best choice. One final(?) note: You might need this line as well: FEATURE(blacklist_recipients) That's not a "might", that's a "MUST" for this case. Note: (sendmail's) cf/README is a rather useful document. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"