Sponsored Content
Top Forums Shell Programming and Scripting Sending mail from shell script Post 302650747 by zaxxon on Monday 4th of June 2012 06:56:56 AM
Old 06-04-2012
And if you got lsof, you can try something like this:
Code:
$ lsof -i :25
COMMAND  PID        USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
exim4   1978 Debian-exim    3u  IPv4   6681      0t0  TCP localhost:smtp (LISTEN)
exim4   1978 Debian-exim    4u  IPv6   6682      0t0  TCP ip6-localhost:smtp (LISTEN)

 

10 More Discussions You Might Find Interesting

1. HP-UX

sending mail from a script

Hi I want to send a mail (to my id like abc@xyz.com) from a shell script running on HP Ux. Would like to include text from a file or include the file as attachment, either ways. Thanks Sidhu (6 Replies)
Discussion started by: Amardeep
6 Replies

2. Shell Programming and Scripting

sending a mail using shell script

Please help me in writing the script for sending an attachment through email.(For example my text file name is :abc.txt and it is in directory d:/abc) (1 Reply)
Discussion started by: anitha126
1 Replies

3. Shell Programming and Scripting

Shell script for sending automatic email to personal mail id

hi guys, I need a shell script to send mail automatically to my personal mail id like xxxx@hotmail.com but while experimenting with "mail" command I faced following problems. cat text1.txt | mail -s 'test mail' xxxx@hotmail.com command successfully executed but while checking for... (4 Replies)
Discussion started by: rrd1986
4 Replies

4. Linux

Memory monitoring and sending alert mail to users in network using shell script

i m workiing on a shell script which may monitors network memory and send alert to user if it increase a threshold (1 Reply)
Discussion started by: navdeep5673
1 Replies

5. Shell Programming and Scripting

Reading a file and sending mail by shell scripting?

hi I need help urgently...i need to write a shell script which can solve the following problem....its urgent plz help me out coz m totally newbie in shell scripting.... the problem is: Suppose I have a folder called logs. whenever some error occurs some correspondence error file is generated. I... (4 Replies)
Discussion started by: sukhdip
4 Replies

6. Shell Programming and Scripting

Shell script for creating log file and sending mail?

Hi , I am trying to create shell script which will help me to compare file name in two folder. There is a multiple file store in 2 folder.I want to compare that with the name. If all the file are same then send a mail that "all date is same" if not then create one log file which contain... (4 Replies)
Discussion started by: san_dy123
4 Replies

7. Shell Programming and Scripting

shell script not sending mail

Hi, I have shell script which checks the filesystem check but does not send the mail. I might be missing something very simple.. could you please help? #!/bin/sh _servers="machine name" _out="/tmp/output.$$" _email="me@there.com" _sub="Disk Space Report $(date)" _mail=/usr/bin/mail... (5 Replies)
Discussion started by: Pandee
5 Replies

8. Shell Programming and Scripting

Sending Mail via shell script

I am in need of a script that will send out emails while going through a NAT. What I have that works is as follows: display_remote_IP | sort | uniq | while read i do FOUND=0 for IP in `echo $ACCEPTABLEIP` do if ; then FOUND=1... (2 Replies)
Discussion started by: ldapguy
2 Replies

9. Shell Programming and Scripting

Configuring smtp settings and then sending the mail through shell script

I have make an menu in which first option is to start and second is to stop the services echo "Please enter the appropriate choice for doing the operations" echo " 1) STOP Services 2) START Services case $choice in 1) ... (1 Reply)
Discussion started by: punpun66
1 Replies

10. Shell Programming and Scripting

A shell script for checking the last image and sending it in attachment to mail

Hello every one. I use mutt : "mpack -s "Test" /home/pi/Pictures/2018-10-05_23_10_40.jpg my_email_addres " to send me a particular picture with the name of the data+jpg in a pictures folder, but this folder I use it for a timelapse proyect with more pictures , and what I need is... (2 Replies)
Discussion started by: maxbcn
2 Replies
UPDATE-EXIM4DEFAULTS(8) 				      System Manager's Manual					   UPDATE-EXIM4DEFAULTS(8)

NAME
update-exim4defaults - Manage exim4 daemon default file. SYNOPSIS
update-exim4defaults [ --qflags flags ] [ --queuerunner combined|queueonly|separate|ppp|no|nodaemon ] [ --queuetime time ] [ --commonop- tions options ] [ --queuerunneroptions options ] [ --smtplisteneroptions options ] [ --remove-common options ] [ --remove-queue options ] [ --remove-smtp options ] [ --force|-f ] [ --help|-h ] [ --init ] DESCRIPTION
update-exim4defaults allows one to set run parameters for the Exim daemon in /etc/default/exim4. Its main purpose is for interaction with packages enhancing Exim like virus-scanners that need to change the way the exim daemon is started. OPTIONS
--help|-h Print short usage instructions and exit. --qflags flags Set qflags, special flags given to exim directly after the "-q". See exim(8) for more information. --queuerunner combined|queueonly|separate|ppp|no|nodaemon Should the init script start one daemon that listens on the smtp port for incoming connections and runs the queue at regular inter- vals (combined) , or should it start two separate daemons, one listening on the smtp port, the other running the queue (separate) , or should the queue only be run by /etc/ppp/ip-up.d/exim4 (ppp) , or shouldn't we run the queue at all, for example if you'd rather do this with cron ? Or should we only start a queuerunner (queueonly) or no daemon at all (nodaemon) ? --queuetime time In which intervals should we run the queue? This passed as option -q<qflags>time to Exim, e.g. -q30m or -qq1h. --commonoptions options Options passed both to queue-running and listening instances of Exim. --queuerunneroptions options Options only passed to the instance of Exim running the queue. --smtplisteneroptions options Options only passed to the instance of Exim listening on the SMTP port. --force|-f Without this option update-exim4defaults exits with an error if at least one of the options --queuetime, --commonoptions, --queuerunneroptions or --smtplisteneroptions is used and the corresponding value in /etc/default/exim4 is already set to a nonempty value. --remove-common option Try to remove the given option from COMMONOPTIONS. --remove-queue option Try to remove the given option from QUEUERUNNEROPTIONS. --remove-smtp option Try to remove the given option from SMTPLISTENEROPTIONS. The --remove-commands cannot be used at the same time as any of --commonoptions, --queuerunneroptions or --smtplisteneroptions. The --remove-commands will additionally remove whitespace at the beginning and the end of the option and exchange multiple spaces wi a single one. --init create a default /etc/default/exim4 file and exit immediately. Unless --force was also specified update-exim4defaults exits (suc- cessfully) without doing anything if /etc/default/exim4 already exists. All other options are ignored. EXIT STATUS
0 change was successful or nothing needed to be done. 1 generic error: wrong options, unreadable configuration file, etc. 2 QUEUEINTERVAL was already set. 4 COMMONOPTIONS was already set. 8 QUEUERUNNEROPTIONS was already set. 16 SMTPLISTENEROPTIONS was already set. 32 QFLAGS was already set. 64 --remove-something failed, i.e. the value of the option was not changed. Exit codes 2 to 32 will be summed up, if more than one unsuccessful option was given. FILES
/etc/default/exim4 The configuration file. /etc/init.d/exim4 The Exim init-script. /etc/ppp/ip-up.d/exim4 The queuerunner in this file also uses COMMONOPTIONS and QUEUERUNNEROPTIONS and does not run if QUEUERUNNER=no. BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches would be greatly appreciated. SEE ALSO
exim(8), /usr/share/doc/exim4-base/ AUTHOR
Andreas Metzler <ametzler at downhill.at.eu.org> EXIM4 March 26, 2003 UPDATE-EXIM4DEFAULTS(8)
All times are GMT -4. The time now is 11:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy