General :: Use Sender Or Any Thing In Header As Ame Of Storing Mail File In Procmailrc?

Apr 19, 2011

I want to know how can I use sender an receiver of the email in name of file for storing mail in procmailrc. I made one but it does not work.

Quote:

SUBJECT=`formail -xSubject:` # regular field
FROM=`formail -rt -xTo:` # special case
:0 b
* ^FROM.*
| sed -e '/^To: +?[0-9]*$/,/report/!d' > ${FROM}${SUBJECT}--`mktemp 20`date +%y-%m-%d-%S--`XXXXXX`

it works when I use :

Quote:

| sed -e '/^To: +?[0-9]*$/,/report/!d' > `mktemp 20`date +%y-%m-%d-%S--`XXXXXX`

View 1 Replies


ADVERTISEMENT

General :: Get Socket.h Header File / Copy Pasting This Header File In 'incl' Directory Allow To Use It In The Program?

Apr 22, 2011

where can i get socket.h header file? will copy pasting this header file in 'incl' directory allow me to use it in the my program?

View 1 Replies View Related

General :: Scan Each Incoming Mail With Conditions On Sender Name And Subject

Jan 8, 2010

Request your help in writing a shell script for the following requirement:

1) scan each incoming mail with conditions on sender name and subject
2) scan the mail body for set of characters and email them.

general usage is as follows: I get a mail as follows from: [URL]... subject : Urgent, reply body : name : xyz contact : 12345 the script should mail the following as subject line: n:xyz c:12345 I know procmail is a good option for this, but I'm compelled to use shell script

View 3 Replies View Related

Server :: Forward Mail Based On Sender ?

Aug 30, 2010

I vae Ubuntu, postfix. I need to forward e-mail based on sender. Can I do it with .forward ?

E-mail that comes from user@yahoo.com destined to user@mydomain.com to be forwarded to user@gmail.com. Other e-mail that comes from any addresse must not be forwarded.

View 2 Replies View Related

Server :: Mail Delivery Failed: Returning Message To Sender

Nov 11, 2010

send email i got bouncing error .see below error;

554 Your access to this mail system has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means.

View 1 Replies View Related

Server :: Mail Delivery Failed: Returning Message To Sender?

Feb 9, 2011

i have a domain where i can send emails to any domain ,unfortunately i cant receive email from any domain . am getting the below error ;

T=remote_smtp: retry time not reached for any host after a long failure period

View 2 Replies View Related

Server :: Postfix Filter Outgoing Mail By Sender Domain ?

Jun 17, 2010

Im trying to get postfix to filter my outgoing mail and basically drop everything that is not in my hash table.

So far I managed to get this going

Code:

Code:

Unfortunately those rules also apply to incoming messages. My goal is to disallow users on my host to change their "MAIL FROM" to anything they like and restrict them to domains I specify. I'm aware that the local part still is variable and a user of domain "foo.com" could use a email of domain "bar.com", but still some of my troubles would be solved if I get this running.

View 2 Replies View Related

Server :: Rejecting Mail Where Sender Matches Recipient In Postfix?

Aug 22, 2009

This seems like a relatively simple question, but I haven't been able to figure it out from the documentation after a couple of hours of searching. I'm running postfix on my mail server, and the vast majority of my spam has the sender address spoofed to match the recipient address. I've got spamassassin up and running, and very little gets through that, so it's not a serious problem, but if possible I would like to be able to reject the mail before it arrives to reduce the system load.

Mail is sent locally via webmail, relaying is denied, so the only way that mail should be sent from the domain is via a connection from localhost. The basic idea I'm thinking of is if the MAIL FROM sender claims to be an address at the receiving domain, but is connected from a remote IP, the mail should be rejected.

View 3 Replies View Related

Red Hat / Fedora :: Use Like Mail Server To Prepare Every Thing For Step?

Jan 19, 2011

step by step to use this as mail server and if it will be hard i need help from him to give me books and i will read and start to use also i need ex plane what i need to use like mail server to prepare every thing for this step it will be more great if i found this in this forums because i read a lot in web sites but i cant found any helpful thing in this case.

View 5 Replies View Related

General :: Reading Numbers From Text File And Storing In Array?

May 26, 2010

I'm writing a bash script where I read a text file (containing a column of numbers) and store each line in an array. There seem to be some problems with the whole thing however, but only for some files and not others. Here's what I do:

Code:
#!/bin/bash
file=time_notOk.txt ### The file with a column of numbers
i=0 ### Array counter
### Read the file

[Code]....

View 3 Replies View Related

General :: Bash + Reading Values (numbers) From A File And Storing Them Into An Array?

Nov 4, 2010

I have to read a couple of numbers from a random.txt file. In this .txt file there are random numbers. They are separated by a space. Example if you opened test.txt:

test.txt :1 6 1 3 6 8 10 2 4

I would like to read those numbers using CAT and store them into an array:

numlen=${#num[*]} - (must be like this because it is a part of a larger program)

View 5 Replies View Related

General :: Use RANDOM Number In Procmailrc?

May 2, 2011

I want to generate random name for email file name to prevent overwriting but $RANDOM ENV VARs does not work in it what can I do? this is my procmailrc:

Quote:

SHELL=/bin/bash
SUBJECT=`formail -xSubject:`
FROM=`formail -xFrom:`
SUBJECT=`echo $SUBJECT | sed -e 's/ /-/g'`
FROM=`echo $FROM | sed -e 's/.*<//g' | sed -e 's/>//g' | sed -e 's/@/AT/g'`
STOREFILE=20`date +%y-%m-%d_%H-%M-%S`_${FROM}_${SUBJECT}_${RANDOM}${RAMDOM}

it works fine except ${RANDOM}${RAMDOM} and I do not want to use mktemp command .

View 8 Replies View Related

General :: Overwrite The Header Of A File Without Copying The Whole File?

Mar 1, 2011

Asuming I have two files, one large file and one small file, I want to write the smaller file to the large file without overwriting the remaining part of the larger file.

Both are binary files, and the large file can become very large, so I want to avoid copying the whole file, as that will take some time. Is there any standard Linux console utility to do this, or do I need to write it myself?

View 2 Replies View Related

General :: Put ELSE For Condition Block Of Procmailrc Recipes

May 2, 2011

How can I have ELSE condition in procmailrc I mean if the mail was from X and Subject has Y OR .... DO something ELSE DO SOMETHING ELSE. I do not want to use two different conditions for each state I want use just one condition and its ELSE because putting too recipes in procmailrc make it too slow .

View 2 Replies View Related

General :: Set Variable In Procmailrc Action Block?

May 2, 2011

I want to know how to set variable in procmailrc action block or condition block I want to set a variable as a random file name to store emails but I don't know how to set a variable in procmailrc action block or condition block .this is my example:Quote:

:0b
* ^FROM.*
{

code]...

View 2 Replies View Related

General :: Extract 5th Column From A File Without The Header?

Oct 15, 2010

How can I extract 5th column from a file without the header.

View 5 Replies View Related

Server :: <Mail From> Header Not Working PHPMailer With SMTP?

Apr 12, 2010

Installing PHPMailer v.5 (server running php5) with SMTP function. I have installed the main files in mail directory such as: # class.phpmailer.php: This is the main class file which contains the various email functions.# class.smtp.php: This additional class allows SMTP authentication.I don't think I need class.pop3.php as I'm sending mails server side (smtp)and should be accepted by most IP's pop3 servers.

All my mail functions work great with SMTP and I can send and receive. My problem is that my recipients only receive mail from admin@domain instead of "My Website Name" Sounds simple enough, I know and I have made adjustments to class.phpmailer.php and have inserted my specific mail attributes for my site such as mail address, mail from, smtp server, user/pass for smtp,etc.PHP Mailer v5.0 class.phpmailer.php is a very long script and I only found a couple of places to put the FROM address as follows:

PROPERTIES,
PUBLIC
/////////////////////////////////////////////////
/**
*
Email priority (1 = High, 3 = Normal, 5 = low).

[code]....

View 1 Replies View Related

General :: Programming In C++ Under Windows Using Graphics.h Header File

Aug 19, 2010

I am new to ubuntu.I have done some programming in c++ under windows using graphics.h header file.I want to implement my programs in ubuntu.How can i do this?I am writing a program.

View 4 Replies View Related

5 Server :: Mail Sent From CentOS Server Received With (No Sender) / Sort It?

May 23, 2011

I am using Postfix on CentOS to send mail through a relayhost. The mail sends fine, but on certain clients such as the mail client on the iPhone or Windows Live Mail, the message is received with '(No Sender)' in the sender field. The Apple Mail client on the iMac works just fine.

Here is the PHP code I am using to send the mail code...

Wondering if there is a configuration setting in /etc/postfix/main.cf I can use to fix this problem. I have scoured the help files but have come up empty.

View 5 Replies View Related

Server :: RHEL4U5 Return To Sender Text From .autoreply File

Jul 28, 2010

Under folder /home/user there are two files : .autoreply (where is the message text) and .procmailrc where is the procmail for autoreply. So .procmailrc looks like this :

[code]...

And it works, returning to the sender the text from .autoreply file. BUT it send this text from the mail account which looks like this: name-from-/etc/passwd-file@server-hostname instead (in my case) [URL]... Under webmail (squirrelmail) the reply address is set as it should be. I looked up a bunch of Internet pages, to no avail. Also masquerade is not a option because my production system has two mail domains.

View 2 Replies View Related

Fedora :: Stopping And Replaying File Causes Same Thing To Happen Again

Jul 29, 2009

I am having a problem with sound in a range of applications. Playing an mp3 file is OK for 30 seconds or so, and then it seems to skip and make crackling noises. Stopping and replaying the file causes the same thing to happen again. I have installed all the mp3 codecs so i'm not sure what's going on.

View 14 Replies View Related

Networking :: No /usr/include/usb.h Header File?

Dec 16, 2010

I was trying to install usb-modeswitch edora-14 (64 bitt saidCode:usb_modeswitch.c:56:17: fatal errr: usb.h: No such file or directoryWhen I tried to install libusb, it said that it is already installed and is the latest version. But, it still doesn't show usb.h in /usr/include directory.What shall I do to make usb-modeswitch?

View 4 Replies View Related

General :: Smartcards For Storing Gpg/ssh Keys?

Apr 14, 2010

I'm interested in storing my SSH keys and gpg keys on a smartcard for added security. However, I'm a bit uncertain on a few points, which are as follows:

How many keys can I get on a card? I assume both SSH and GPG can store keys on the card. Is there a limit to key size? I see a lot of cards saying they support 2048-bit keys, what about larger sizes? Hardware: can anyone recommend a card/reader combination that works well? I've done a fair amount of research and it seems PC/SC readers can be a bit iffy - is this your experience? Have I missed anything I should be asking? Are there any other hurdles?

I'm aware fsf europe give away cards with membership - I'm not sure I want to join, but... are these cards any good?

View 3 Replies View Related

General :: Storing Array From Awk In Bash?

Nov 24, 2010

i'm using awk inside bash. i've got an array in awk called arrayinawk. everytime i call another awk command in bash i have to keep creating arrayinawk to work with it. is there anyway i can store arrayinawk in bash and just call the stored value next time i use awk?

View 14 Replies View Related

Programming :: Can't Write Header To Excel File?

Jan 15, 2010

I am having trouble getting some code to work. It takes an input file (csv) and converts it to an XLS. The problem is that I can't seem to get a header to be printed first...

Code:
use Spreadsheet::WriteExcel;
my $input = $ARGV[0];

[code]...

View 5 Replies View Related

Programming :: Get Jpeg File Header Using C Language?

Oct 10, 2009

I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U.

View 7 Replies View Related

Programming :: Setting For Header File And Library?

May 8, 2010

I have 3 files: main.c, mylib.h, mylib.c Now I want to put mylib.h into : /usr/include/mydir/mylib.h And I create a static library: libmylib.a, and put into the folder: /usr/lib/mydir/libmylib.a Then I compile: $ gcc -o main main.c Then I got linking error

Code:
main.c:(.text+0x3e): undefined reference to `extract_v1'
main.c:(.text+0x7b): undefined reference to `modify_v1'
collect2: ld returned 1 exit status

So I try with -l options: $ gcc -o main main.c -lmylib I still got error

Code:
/usr/bin/ld: cannot find -lmylib
collect2: ld returned 1 exit status
Any idea about this?

Also, I want to ask about: how to create my own header and library to put into /usr/include/mylib/ and /usr/lib/mylib/, so when I use function in my program, the compiler will automatically link to library. It's like when you #include <stdio.h>, and you compile: $ gcc -o program program.c, you don't need to specify any linking folder or library.

View 4 Replies View Related

General :: Add PHP User As Trusted Sender In Sendmail?

Jul 7, 2010

I have a mail script that has been running on my website for several years. One problem I had with the script was when a bad address was put in, the mail was rejected to the server rather than to the sender. I have now recently added a fifth parameter to the mail script using the -f sendmail option to set the return path.

PHP Code:

$mailsend=mail("$email","$subject","$emess","$ehead","-f$adminEmail");

The PHP manual says this:

Quote:

The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users. I do have the 'X-Warning' header on e-mails sent with this script and have asked my server administrator for some help in adding "the user that the Web server runs as" as a trusted user.

View 2 Replies View Related

General :: Change Sendmail's Sender Address?

Jun 17, 2010

We're using mutt to send out a daily email through cron. The only problem is that half the people aren't getting it, because its getting rejected as coming from an invalid address. Right now its sending out as username@localhost.localdomain.

How can I change this? I found the sendmail.cf, which I believe previous people have been editing directly, which from what I read isn't the best way to configure sendmail.

View 14 Replies View Related

General :: Script To Block Sender Domain

Apr 23, 2011

In our mail server we are taking lots of hits. In the maillog there's a hell of rejected mail like these:

Code:

I Have a script which search for the IP and block those. I'm having problem if IP block the RCPT IP's.

Instead i want to block the sender domain, like in this example, shareme.com. What's shall i modify in my script to do this?

Code:

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved