Sponsored Content
Top Forums Shell Programming and Scripting MAILX too much time to send email Post 302933729 by occhiverdi1987 on Monday 2nd of February 2015 05:30:27 AM
Old 02-02-2015
Question MAILX too much time to send email

Hello,
I am using heirloom-mailx on UBUNTU 11.04 to create a bash script that sends an e-mail with an attachment.
The command invoked is :
Code:
echo $BODY | mailx -v \
-S smtp=smtps://$smtpmailserver:465 \
-S from=$MITTENTE \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp-auth-user=$USER \
-S smtp-auth-password=$PASSWORD \
-s "$SUBJECT" \
-a $ATTACHMENT \
$RECIPIENT

The result is :
Code:
Resolving host xxxxxxxxxx . . . done.
Connecting to xxxxxxxxxx . . . connected.

Then I have to wait ONE MINUTE before it appears the following:

Code:
220 (mail-server) ESMTP ready
>>> EHLO svn
250-(mail-server)
250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5 NTLM
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-PIPELINING
250-ETRN
250-DSN
250 HELP
>>> AUTH LOGIN
334 (string)
>>> (string)
334 (string)
>>> (string)
235 2.0.0 Authentication successful
>>> MAIL FROM:<(sender)>
250 2.1.0 Sender <(sender)> ok
>>> RCPT TO:<(recipient)>
250 2.1.5 Recipient <(recipient)> ok (local)
>>> DATA
354 Enter mail, end with CRLF.CRLF
>>> .
250 2.0.0 (string) Message accepted for delivery
>>> QUIT
221 2.0.0 SMTP closing connection

Do you know why there is such a delay? How can I reduce the sending time?
It is not linked to the attached file, I have to wait also if it is not present.

Thanks in advance for any reply.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

2. Shell Programming and Scripting

Using mailx to send email to multiple users.

Hi, I am using the mailx command to send email to multple users. The command works fine when i am sending mail to a single user but when i insert multiple email ids inside the quote it does not work. All the email ids are coming from a property file.Please have a lookt at the property file and... (4 Replies)
Discussion started by: priyaksingh
4 Replies

3. Shell Programming and Scripting

How to send attachment to web-based email client using mailx

hi, i am trying to send mail with attachment to web-based email client like gmail.com using mailx. the problem is it is displayed in content rather than as attachment. the code i am using is as follows, uuencode test1.txt test1.txt | mailx -s "test only" aaaa@gmail.com does anyone... (1 Reply)
Discussion started by: randomcz1
1 Replies

4. UNIX Desktop Questions & Answers

Using Mailx to send to list of email addresses

Im trying to use a shell script to send to a list of email addresses in a txt file. Here is what i have tried but it keeps sending to dead.letter... Success.ksh contains... mailx -s"Night Batch Success" 'cat /Scripts/email_addresses.txt' < /Scripts/email_body_message.txt The email body... (1 Reply)
Discussion started by: aguad3
1 Replies

5. UNIX for Dummies Questions & Answers

Not able to send email as CC to a ID using Mailx command in HP UX

Hey Guys, I have been trying to send a email as ccto a email ID .However it seems the -c option is not working in HP UX system. It is shooting an error as "mailx: illegal option -- c" My script isin the below manner: mailx -c EMAIL_IDS_CC# -s 'BDC reminder' -r sender@email.com... (1 Reply)
Discussion started by: rohit.shetty84
1 Replies

6. UNIX for Advanced & Expert Users

Send email using alias name through mailx

Hi, My requirement is I have to send email using mailx command and the recipient of the mail should see a alias instead of email address in his mail box. The same functionality that we get when we sent email using an address book. Is this functionality possible through mailx? I tried doing... (5 Replies)
Discussion started by: vamsisurampalli
5 Replies

7. Solaris

How can i use Mailx to send email

I would like to use Mailx command, please i hope when you replay give me example. because this is very good think for me. I am New in sun Microsystems Solaris 10, i hope to give me also rules to learn Solaris easily. Thank you Joseph Shafik (8 Replies)
Discussion started by: J.shafik
8 Replies

8. Shell Programming and Scripting

Need Syntax for mailx to send email to CC

I am trying to send email using "echo "Test Email" | mailx -s "Subject" someone@xyz.com I also want to send CC to another email address along with TO using above statement. Can anyone please help me on this. Thanks. (2 Replies)
Discussion started by: swap27
2 Replies

9. UNIX for Dummies Questions & Answers

Send email with attachment and body : mailx , waiting for input , signal Control D

Hi, I am trying to send email with attacment and body using "mailx" (cat body.txt; uuencode attach.txt) | mailx -s "Attachment" abc@xyz.com When i type this command, the shell is still waiting for me to enter something in standard input and press control D before it sends a mail and... (2 Replies)
Discussion started by: aliaszero
2 Replies

10. Debian

sendmail taking too much time to send a email

Hi , I'm using sendmail command to send a email. To send a email sendmail taking 3minutes to complete the process. Is there any configuration needs to be done in server or another solution is there to resolve this issue. Thanks in Advance. Regards Latika (1 Reply)
Discussion started by: latika
1 Replies
GEN-AUTH(1)						User Contributed Perl Documentation					       GEN-AUTH(1)

NAME
gen-auth - generate various authentication strings USAGE
gen-auth [--help|--version] | <type> ... DESCRIPTION
gen-auth is tool to assist in all kinds of authentication / encoding / decoding / encrypting tasks. It began life as an smtp-specific tool, but has drifted in functionality over time. The program actions are broken down into types of encoding to generate. Each <type> then takes its own specific args. The arguments are expected in a specific order on the command line. Every argument that isn't available on the command line will be prompted for. One benefit to this is arguments corresponding to passwords will not be echoed to the terminal when prompted for. TYPES
The program action is controlled by the first argument. The meaning of the following arguments is specified by this type PLAIN <username> <password> This type generates a PLAIN (RFC 2595) authentication string. It accepts supplemental arguments of username and password. It generates a Base64 encoded string "<username><password>". LOGIN <username> <password> This method accepts username and password as supplemental args. It simply returns each string Base64 encoded. This provides only minimal advantages over using ENCODE twice. One advantage is hiding the password if you provide it on STDIN CRAM-MD5 <username> <password> <challenge> CRAM-MD5 (RFC 2195) accepts three supplemental arguments. The first is the username and the second is the password. The third is the challenge string provided by the server. This string can be either Base64 encoded or not. The RFC states that all (unencoded) challenge strings must start w/ '<'. This is used to whether the string is Base64 encoded or not. CRAM-MD5 uses the challenge and the supplied password to generate a digest. it then returns the Base64 encoded version of the string md5("<username> <challenge>") This authentication method requires the Digest::MD5 perl module to be installed. CRAM-SHA1 <username> <password> <challenge> This behaves the same as CRAM-MD5 but uses SHA1 digesting rather than MD5. This authentication method requires the Digest::SHA1 perl module to be installed. NTLM/SPA/MSN <username> <password> <domain> <challenge> Although it may be advertised as one of the above types, this method of authentication if refered to singularly as NTLM. This is a multi-step authentication type. The first 3 arguments must be supplied up front. They are username, password, and domain, in that order. These three strings are used to generate an "Auth Request" string. This string should be passed verbatim to the server. The server will then respond with a challenge. This challenge is the fourth argument. After receiving the server challenge, gen-auth will produce an "Auth Response". Posting this response to the server completes the NTLM authentication transaction. This authentication method requires the Authen::NTLM perl module to be installed. See EXAMPLES for an example of this transaction. Note also that 'domain' is often blank from client or ignored by server. HTTP-BASIC <username> <password> Returns the value base64("<username>:<password>"). Used for HTTP Basic authentication (RFC 2617). Used by adding a header "Authorization: Basic <string>" to a HTTP request where <string> is the output of this command. APOP <challenge> <password> This implements the APOP authentication for the POP3 protocol as described in RFC 1939. <challenge> is the challenge string presented by the POP3 server in the greeting banner. <password> is the "secret" (usually a password) used to authenticate the user. This method returns a digest md5("<challenge><password>"). This can be used to authenticate to a POP3 server in a string like "APOP <user> <digest>" where <digest> is the string generated by this command. APOP required the Digest::MD5 perl module. ENCODE <string> Simply Base64 encodes a plaintext string. Provided as a convenience function. DECODE <string> Decodes a Base64 encoded string. Provided as a convenience function. MD5/MD5-HEX <string> Provides an MD5 digest of the supplied string in hex. MD5-BASE64 <string> Provides an MD5 digest of the supplied string in Base64. ENCRYPT <string> Returns a crypt(3) string generated from the input string. SALTENCRYPT <string> <salt> Same as ENCRYPT but you provide the salt as the second argument. See crypt(3) man page for details. ROT13 <string> This performs a rot13 action on <string>. This implementation only performs the action on ASCII 65-90,97-123. Any other character value is left untouched. Therefore this method is primarily for LOCALE=C, ASCII only. Feel free to send patches if you care to have it work in another setting. ATBASH <string> This performs an atbash action on <string>. Atbash mirrors a string such that 'a'=='z', 'b'=='y', etc. See the comments on locale and character set under ROT13. OPTIONS
-s Supresses echo on all input fields read from standard input. If this option is not used, echo is suppressed on fields which are known to be password fields but this may not be secure enough. --help this screen. --version version info. EXAMPLES
generate a PLAIN AUTH string for user 'tim', password 'tanstaaftanstaaf' > gen-auth plain tim tanstaaftanstaaf Auth String: AHRpbQB0YW5zdGFhZnRhbnN0YWFm generate a CRAM-MD5 string for user 'tim', password 'tanstaaftanstaaf', challenge '<1896.697170952@postoffice.reston.mci.net>', using prompt to hide password > gen-auth cram-md5 username: tim password: challenge: PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+ dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw use the DECODE method to ensure we provided the correct output in our last example > gen-auth decode dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw tim b913a602c7eda7a495b4e6e7334d3890 use the NTLM (MSN) method to authenticate to a mail server using user 'tim', password 'tanstaaftanstaaf', and domain MAIL. Both the gen- auth transaction and SMTP transaction are shown to demonstrate the interaction between the two. AUTH MSN 334 NTLM supported TlRMTVNTUAABAAAAB7IAAAMAAwAgAAAABAAEACMAAAB0aW1NQUlM 334 TlRMTVNTUAACAAAAAAAAAAAoAAABggAA9RH5KZlXvygAAACAAAAAZL//4sQAAAAC TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAAAwAAAABgAGAHAAAAAGAAYAdgAAAAAAAAA8AAAAAYIAAK3lcO8PldNxIrkbvgKGJRR5owQePUtYaTtLVgfQiVQBywW2yZKyp+VFGqYfgDtdEHQAaQBtAHQAaQBtAA== 235 Authentication succeeded > gen-auth spa username: tim password: domain: MAIL Auth Request: TlRMTVNTUAABAAAAB7IAAAMAAwAgAAAABAAEACMAAAB0aW1NQUlM challenge: TlRMTVNTUAACAAAAAAAAAAAoAAABggAA9RH5KZlXvygAAACAAAAAZL//4sQAAAAC Auth Response: TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAAAwAAAABgAGAHAAAAAGAAYAdgAAAAAAAAA8AAAAAYIAAK3lcO8PldNxIrkbvgKGJRR5owQePUtYaTtLVgfQiVQBywW2yZKyp+VFGqYfgDtdEHQAaQBtAHQAaQBtAA== REQUIRES
MIME::Base64 Required for all functionality Digest::MD5 Required for MD5, MD5-BASE64, CRAM-MD5, APOP Digest::SHA1 Required for CRAM-SHA1 Authen::NTLM Required for NTLM/MSN/SPA EXIT CODES
0 - no errors occurred 1 - unrecognized type specified CONTACT
proj-gen-auth@jetmore.net perl v5.14.2 2013-06-09 GEN-AUTH(1)
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy