| Advertise on warmetal.nl! Click for more information about advertising here. |
Did you find this website useful? Did I save you a lot of time? |
|
Note: I replaced the @ in the mail addresses by a _ because of spam. Use correct email addresses
/home/sjoerd>mail -s "testsubject" sjoerd_warmetal.nl Test body . Cc:
/home/sjoerd>cat smit.log | mail -s "logfile" sjoerd_warmetal.nl
/home/sjoerd>cat smit.log | mail -s "logfile" sjoerd_warmetal.nl info_warmetal.nl sjoerd.hooft_warmetal.nl
sjoerd@server:/home/sjoerd>cat .forward sjoerd_warmetal_nl
Note: Fill in an existing email address of course, this is where the mail will be send.
# my official domain name # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM Djcompany.local # "Smart" relay host (may be null) DS10.10.10.10
# privacy flags O PrivacyOptions=goaway
4 mail mail warning message forwarded from appserver: sendmail[430420]: o916t011168410: forward /var/data/appuser/.forward: world writable directory 01 Oct 2010, 08:55:00 5 mail mail warning message forwarded from appserver: sendmail[430420]: o916t011168410: forward /var/data/appuser/.forward.appserver: world writable directory 01 Oct 2010, 08:55:00 6 mail mail warning message forwarded from appserver: sendmail[430420]: o916t011168410: forward /var/data/appuser/.forward+: world writable directory 01 Oct 2010, 08:55:00 7 mail mail warning message forwarded from appserver: sendmail[430420]: o916t011168410: forward /var/data/appuser/.forward.appserver+: world writable directory
as well as these warnings but then for “group writable directory”.
Some more information about this:
The biggest surprise is likely to come from .forward and :include: files in unsafe directory paths (directory paths which are group or world writable). This is no longer allowed. This would mean that if user joe's home directory was writable by group staff, sendmail would not use his .forward file. This behavior can be altered, at the possible expense of system security, by setting the DontBlameSendmail option. Items from these unsafe .forward and :include: files will be marked as unsafe addresses – the items can not be deliveries to files or programs. This behavior can also be altered via DontBlameSendmail.
I've set:
O DontBlameSendmail=forwardfileinunsafedirpath, forwardfileinunsafedirpathsafe
The first flag allows the forward file to be read, the second allows the items in the file to be marked as safe for file and program delivery.
startsrc -s sendmail -a "-bd"
stopsrc -s sendmail
stopsrc -s sendmail; startsrc -s sendmail -a "-bd"
echo \$Z | /usr/sbin/sendmail -bt -d0
cd /var/spool/mail vi username :%d :wq
mail
d *
f * : DISPLAY headers> mail -s "test" sjoerd_warmetal_nl test . Cc: > cat shell_func.sh function mail_att_to_me() { (for k in ${1}; do uuencode $k ${k##*/}; done) | \ mailx -r sjoerd-noreply_warmetal_nl -s "Attachment(s) for me" sjoerd_warmetal_nl }
Discussion