Sponsored Content
Top Forums Shell Programming and Scripting Storing a log file of delivered mails Post 302432485 by dazdseg on Friday 25th of June 2010 06:02:56 AM
Old 06-25-2010
put the mailx command in a for loop and in the loop use a if condition checking the exist status. something like below :-

Code:
for reci in RECIPIENT_LIST  (where its taking it)
do 
mailx -f " " -s" " " " 
if [[ $? -eq 1 ]] 
then 
echo "the mailx fail to deliver mail  $reci"
eco reci >> not_delivered_list
fi
done

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to request a "read" or "delivered" receipt for mails

Dears, I've written a script which allows me to send mails in different formats with different attaches. Now I still want to add a feature to this script. My users would like to be able to receive a "read" or "delivered" receipt for their mails. The script send mails on behalve of an specific... (1 Reply)
Discussion started by: plelie2
1 Replies

2. Shell Programming and Scripting

How to attach an excel file/ dat file thru unix mails

Hi. I want to attach a .xls or .dat file while sending mail thru unix. I have come across diff attachments sending options, but allthose embeds the content in the mail. I want the attachement to be send as such. Please help me out. regards Diwakar (1 Reply)
Discussion started by: diwakar82
1 Replies

3. UNIX for Dummies Questions & Answers

Parse Text file and send mails

Please help. I have a text file which looks something like this aaa@abc.com, c:FilePath\Eaaa.txt bbb@abc.com, c:FilePath\Ebbb.txt ccc@abc.com, c:FilePath\Eccc.txt ddd@abc.com, c:FilePath\Eddd.txt...so on I want to write a shell script which will pick up the first field 'aaa@abc.com' and... (12 Replies)
Discussion started by: Amruta Pitkar
12 Replies

4. UNIX for Dummies Questions & Answers

how can i recd error log on my sent mails?

I am using the following command to send mail which comprises of a message body (mail_msgbody.txt), Subject(rtf attachment) and a RTF attachment. uuencode ${FILE_NAME} ${FILE_NAME} >> mail_msgbody.txt mailx -s"rtf attachement" aaa@yahoo.com < mail_msgbody.txt When I send mail ...how can I... (0 Replies)
Discussion started by: Amruta Pitkar
0 Replies

5. UNIX for Dummies Questions & Answers

Mail delivered successfully?

Hi Is there any way I can know whether my mail has been delivered successfully or not....? I am using a shellscript which configures the header and the message body and also includes configurations for attachments. I use 'sendmail' to send the mails.... I have to resend the failed emails after... (7 Replies)
Discussion started by: Amruta Pitkar
7 Replies

6. UNIX for Dummies Questions & Answers

How to redirect all mails to text file?

Hi, I need to develop one application that reads all my mails (in unix mail box), and write into one txt file, My server is AIX .My mails are in AIX mail box. Any idea? (0 Replies)
Discussion started by: redlotus72
0 Replies

7. UNIX for Advanced & Expert Users

Mail not getting delivered to user

Hi, There is a unix box in production from which mails will be sent to user/group. From this box, many mails will be sent. But only for one mail which is sent from the box, it is showing a message like "Deferred: 421 Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Service not... (2 Replies)
Discussion started by: trichyselva
2 Replies

8. Shell Programming and Scripting

How to inform the target that a file was delivered to the FTP directory?

Hi, I have a FTP server and a directory location where i will be FTPing the flat file. My requirement is After the flat file was generated to the location, i need to write some trigger file or something to inform them that the file was delivered to them. Please let me know how i can do... (2 Replies)
Discussion started by: srikanth_sagi
2 Replies

9. Solaris

Mail not getting delivered

Hi I seem to have a problem in my solaris 10server, when I type mailx the following pop up: mailx mailx version 5.0 Type ? for help. "/var/mail//moneta": 109 messages 1 new 109 unread U100 Mail Delivery Subs Thu Sep 17 04:34 133/5631 Warning: could not send m U101 moneta ... (2 Replies)
Discussion started by: fretagi
2 Replies
DOVEADM-ALTMOVE(1)						      Dovecot							DOVEADM-ALTMOVE(1)

NAME
doveadm-altmove - Move matching mails to the alternative storage (dbox-only) SYNOPSIS
doveadm [-Dv] altmove [-r] [-S socket_path] search_query doveadm [-Dv] altmove [-r] [-S socket_path] -A search_query doveadm [-Dv] altmove [-r] [-S socket_path] -u user search_query DESCRIPTION
This command can be used with sdbox or mdbox storage to move mails to alternative storage path when :ALT=<path> is specified for the mail location. In the first form, doveadm(1) will executed the altmove action with the environment of the logged in system user. In the second form, the command will be performed for all users. In the third form, only matching mails of the given user(s) will be moved to the alternative storage. OPTIONS
Global doveadm(1) options: -D Enables verbosity and debug messages. -v Enables verbosity, including progress counter. Command specific options: -A If the -A option is present, the command will be performed for all users. Using this option in combination with system users from userdb { driver = passwd } is not recommended, because it contains also users with a lower UID than the one configured with the first_valid_uid setting. When the SQL userdb module is used make sure that the iterate_query setting in /etc/dovecot/dovecot-sql.conf.ext matches your data- base layout. When using the LDAP userdb module, make sure that the iterate_attrs and iterate_filter settings in /etc/dovecot/dove- cot-ldap.conf.ext match your LDAP schema. Otherwise doveadm(1) will be unable to iterate over all users. -r When the -r option is given this command works the other way round. Mails will be moved from the alternative storage back to the default mail location. -S socket_path The option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket. This allows an administrator to execute doveadm(1) mail commands through the given socket. -u user/mask Run the command only for the given user. It's also possible to use '*' and '?' wildcards (e.g. -u *@example.org). When neither the -A option nor -u user was specified, the command will be executed with the environment of the currently logged in user. ARGUMENTS
search_query Messages matching this search query will be moved to alt storage. See doveadm-search-query(7) for details. FILES
/etc/dovecot/conf.d/10-mail.conf Mailbox locations and namespaces. /etc/dovecot/conf.d/auth-*.conf.ext Authentication processes, including userdb settings. EXAMPLE
This example moves seen mails older than one week to alternative storage under /nfsmount: mail_location = mdbox:~/mdbox:ALT=/nfsmount/%h/mdbox doveadm altmove -u johnd@example.com seen savedbefore 1w REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail- able at: http://dovecot.org/bugreport.html SEE ALSO
doveadm(1), doveadm-search-query(7) Dovecot v2.2 2011-09-15 DOVEADM-ALTMOVE(1)
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy