Ubuntu :: "-r" Flag For Mailx Not Working?

Jun 22, 2010

I recently set up an email server at work on a ubuntu box, running exim4. Everything seems to be working fine, but when I try to change the "from" header in the message, its not letting me.

I wanted to send a message from the root user as "admin".

I assumed this would be easy as:

Code:
mailx -r admin recepientname

but for some reason the mailx program is claiming that "-r" is not a legitimate tag, when I try it tells me:

Code:
mail: invalid option -- r
usage: mail [-eIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-s subject] to-addr ...
[-- sendmail-options ...]
mail [-eIiNnv] -f [name]
mail [-eIiNnv] [-u user]

View 1 Replies


ADVERTISEMENT

Fedora :: Mailx Command Isn't Working?

Jan 28, 2010

I am trying to email some log files from my RHEL 5.3 server to my Outlook corporate account and nothing happens. Here is the command I use:[root@server1]# mailx -s "server info" my_id@my_corporate_domain < server_infoThe file server_info does exist and is a small log file. I checked for sendmail and seems to be running OK as follows:

[root@server1]# ps -ef | grep -i mail
root 13954 1 0 2009 ? 00:00:00 sendmail: accepting connections
smmsp 13962 1 0 2009 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue

I'm not at all familiar with mail clients or mail system in Linux. Is there anything missing? I don't have to use mailx, I could use an alternative. Just please let me know how to sent a simple mail from this server to my corporate account using any tools possible (and maybe how to set it up)

View 1 Replies View Related

CentOS 5 :: Mailx And Sendmail Not Working?

Feb 19, 2009

Im unable to send mail using mailx or sendmail. The sendmail daemon is running.

View 1 Replies View Related

OpenSUSE Network :: 11.4 - Mailx Not Working (Message Not Sent)

Apr 25, 2011

I am running a opensuse 11.4 with mailx 12.2. I am trying to sent emails via command line using mailx. I have not configured any mail server in yast. My .mailrc in my homefolder looks like this:

set smtp-use-starttls
account gmx {
set smtp=mail.gmx.net:465
set smtp-auth=login
set smtp-auth-user=my.name@gmx.de
set smtp-auth-password=mypassword
set from="My name <my.name@gmx.de>"
}

Unfortunately when I use the command
mailx -s"Test" -A gmx my.name@gmx.de [Return]
Hallo
[ctrl+d]
I am getting only the message
Unexpected EOF on SMTP connection
"/home/myname/dead.letter" 11/338
. . . message not sent.

View 9 Replies View Related

Ubuntu :: Include Flag Not Working For Grep?

Apr 19, 2011

I'm trying a recursive search -- only PHP files -- and yet grep is searching SQL files too.

Code:
sneakyimp@Ubuntu-64bit:/var/www/site$ grep -irl --include='*.php' 'car_images' *
2011_02_11_dump.sql
car_images_pending.sql
client/search_results.php

[Code]....

View 8 Replies View Related

General :: Rsync - Cygwin On XP - Delete Flag Not Working

Aug 4, 2009

I installed cygwin with rsync on a Win XP Machine. My goal is to backup a folder from one hard drive to another (both on XP machine).

I run the following command from a batch file:

Works fine except the --delete flag is not working. Copies everything in source to destination, but doesn't delete some extra files that are present on the destination, but aren't on the source, which it's supposed to. I looked at the rsync man page, and I'm doing everything right... such as not using wildcard.

The same command works perfect on another computer (XP machine; source and dest both on XP machine).

View 1 Replies View Related

Ubuntu :: Sending Attached Files With Mailx?

Jan 5, 2010

Formerly it was possible to send attached files using the "-a" option eg. mailx -a /home/yan/textfile [URL]. (I think -a stood for "attached". At the time the "-a" option figured as an option for sending attached files.Now it is an option for sending headers. how one can now send attached files using mailx?

View 1 Replies View Related

Ubuntu :: Bash Script For Sending Email Using Mailx?

May 8, 2010

I'm trying to send an email using mailx, in a bash script, but I can't get it to work. In the terminal I can, and this is how I do it:

Code:
$ mailx johndoe@gmail.com
Message^D

Within seconds of doing this, I get sent an email. The problem is with the bash script I'm trying to make. Among other things, I tried this:

Code:
#!/bin/bash mailx johndoe@gmail.com < "Message" I honestly don't know what I'm supposed to do, and I've Googled a bunch of things too, and didn't have too much luck. Is there anyone who could help me out?

Edit: Figured it out. This is what I did, and it works for me:

Code:
#!/bin/bash
echo "Message" | mail -s "Subject" "johndoe@gmail.com"

View 8 Replies View Related

Slackware :: Setup For Mail - Mailx ?

May 18, 2010

I was wondering how to setup slackware such that I can send and receive local mail using the commandline "mail" command.

I tried sending a sample mail this way:

And it looks like the message was sent, but when I then go check:

it says there is no mail.

Do I need to have sendmail running for just local mail calls?

View 5 Replies View Related

Fedora :: Inconsistent Delivery With Nail Or Mailx ?

Sep 5, 2011

I have a script that sends short reports via the mailx command which is failing a lot lately.

Syntax used is basically: mailx -s "the subject" -r somebody@somewhere.com myemail@gmail.com < textfile.txt

For what ever reason this command has become very unreliable lately. I've tested on the command line and sometimes it works but frequently fails. The -r address seems to cause problems as it always fails with a -r set to my work address. I've read several theads and tried adding a .mailrc file but couldn't get past the NSS configuration setting. (Using my mozilla x123x.default dir results in Error initializing NSS: Security library: bad database. )

The nail command behaves about the same. what would make email sending so intermittent?

I've checked the /var/log/maillog but see each mail session end with the following and no errors reported:

View 3 Replies View Related

General :: Mailx Doesn't Send Mail

Mar 1, 2010

I'm having issues sending mail on a Debian (Lenny) box using mailx.

root@deity:/# mail root
Subject: Hai
Hi, root!

[Code].....

Does anyone have an idea what might be causing this?

View 2 Replies View Related

General :: Control Sendmail Or Mailx From A File?

Oct 14, 2010

I need to control sendmail or mailx from a file. The file will have the receprent as the first line, Subject: has the second line, etc. From what I can find with Google the only why to define the target and subject is on the command line? Does any one know of a way to make a mailer use the data in a file? The file would look like this:

Code:

[code].....

View 2 Replies View Related

General :: Mailx Script Using Unspecified Recipients

Mar 1, 2010

Red Hat.
bash script.

I know there are several posts to do with mail and mailx, but nothing obvious in terms of my problem. Below is a small excerpt from the script that runs, but seems to have developed a problem.

###### Email Parameters ######
RECIPIENTS="name1@domain"
SUBJECT="${HOSTNAME} Subject Line"

[Code].....

The email is sent, but with numerous recipients, rather than the one specified in the RECIPIENTS variable, and because most of these aren't valid, getting a dead.letter. I've put in some debugging to check values of recipient and subject, and they show as expected.

View 4 Replies View Related

General :: Sending Mail With Mailx Version 12.1

Jul 2, 2010

GNU/linux kernel 2.6, Slackware 12.0.

I ran mail (aka mailx) and opened an account foo. If I remain inside the program, the command 'account foo' prints the account data. Good. But if I exit the program, and rerun it, then the command 'account' has no output which is to say I have no account.

View 1 Replies View Related

Slackware :: Instruct Mailx To Use Postfix Instead Of Sendmail?

Jun 22, 2011

im just wondering is it possible to instruct mailx to use postfix instead of sendmail while have sendmail and postfix installed? like system-switch-mail way in other distros. basically i would like to be able to use mailx when i uninstall sendmail and keep postfix only installed, so i dont get msg after i press . to send email from mailx

Code:
/usr/sbin/sendmail: No such file or directory

View 7 Replies View Related

CentOS 5 :: Set Mailx To Use External Smtp Server?

Jan 14, 2011

In Red hat i used the nail command to send mail using an external smtp server without sendmail or other mail services active. My question is: In Centos 5 nail is not present but is present mailx in version 8.1.1-44.2.2

Is there a way to set mailx to use external smtp server ? because in many forum i get the string mailx -S smtp= etc.etc. but in my case the -S parameter generate mailx: invalid option -- S antoher question is there a an official repository to download rpm nail for centos ?

View 3 Replies View Related

OpenSUSE Network :: Using Mailx To Send Mail To Gmail?

Oct 11, 2009

I have a couple of servers that are scripted to send cron script output logs to my email address (a Gmail address). Mailx is what I am using, but I didn't have to configure anything; I installed it, and it just worked with the following command: mailx -s "SUBJECT" -r FROMMYADDRESS TOMYADDRESS < FILETOCATANDSEND

This occurs every Saturday and Sunday at noon after my backup scripts run.
I noticed yesterday that I did not receive these logs, so I logged into the machine, started 'mail' and saw messages like this: This is the mail system at host media.deagle.lan.

[Code]....

View 9 Replies View Related

OpenSUSE Network :: Mailx Creates Unwanted Attachment

Sep 9, 2010

I run in a script a mailx command like this:cat logfile | mailx -s'the logfile' to-me@..This works most of the time, but in some cases mailx automagically turns logfile into an attachment called 'attachment.bin'.I think this may be because 'logfile' contains a few control characters or escape codes?How can I tell mailx to be less intelligent and treat it as an ASCII text file?

View 3 Replies View Related

General :: Mailx Cmd - How To Ignore The Machine Name Getting Appended To The Receiver Mailaddr

Mar 12, 2011

I am facing some problem with the mailx commmand. When i run the mailx command from the command line it sends it to the correct mail address which i mention.

#cat mailbody | mailx -s "Test" sampleaddr@abc.com

But when i run the same command from a perl script, it appends the machine name (hostname.abc.com) to the mail address, and the mail address (sampleaddr@abc.com - which i entered) becomes invalid [URL] - found in the maillog), failing to reach the receiver. I am running it from the csh shell. how to avoid this addition.

View 2 Replies View Related

Ubuntu :: Can't Boot Except With Noacpi Flag

Dec 18, 2010

yesterday ubuntu 10.04 hanged so i restarted it and i wasnt able to boot again all what i get is a blank screen with a blinking cursor... also windows7 dont boot (hangs during loading) after some googling i was able to boot only in linux by setting the noacpi flag during booting in grub but there was no internet connection (wired connection) i guess that noacpi is the reason ??

what i have tried :livecd: doesnt boot except with the noacpi flag and no internet connection reinstalling grub : doesnt solve the problem replace the power supply : nothing differ

View 4 Replies View Related

General :: What Does Mkdir -p Flag Do

Jul 19, 2010

What does the mkdir -p flag do? i.e the '-p' part?

View 1 Replies View Related

General :: What Does The -i Flag Mean In Rm File?

Oct 15, 2010

What does the -i flag mean in rm i my_file?

View 2 Replies View Related

General :: Necessary To Set Boot Flag?

Jan 24, 2011

In another forum (I each day visit a lot of them) a user was stating that you need to set a boot flag to make the root partition bootable, if you create partitions with GParted in order to install a Linux with GRUB2. Another was suggesting that, if you install Linux with GRUB2, the installer automatically sets a boot flag to the root partition to make it bootable (I don't remember the names). I neither believe the first nor the second thesis and I'm hoping that in this excellent forum some Gurus not only are saying I'm right but also give a comprehensive answer.

View 2 Replies View Related

General :: Getting To The GUI On Red Flag Desktop 5.0NE

May 26, 2010

I just bought an Eee Box with Red Flag Linux Desktop 5.0NE. My intention was to use it as a backup server at home to backup files and photos, etc.

How to I get to a graphical user interface so I can start to know what I'm doing?

When I switch on the machine, it says:

Red Flag Desktop 5.0NE
Kernel 2.6.21.0-22 on an i686
localhost login:

View 1 Replies View Related

Red Hat :: Default Value Of Stay_setuid Flag?

Apr 6, 2010

From the man page for sudoers (RHEL5.4), I notice that the default value for stay_setuid flag is 'OFF'.

In RHEL4.8, th man pages don't specify the default value.

What is (maybe) the default value of 'stay_setuid' in RHEL4 ?

View 1 Replies View Related

Ubuntu :: HP_RECOVERY Partition Is Hidden Despite Lack Of Flag?

Jan 9, 2010

Little explanation: OEM HP pcs come with an HP_RECOVERY partition which contains an installer which will wipe the HD and install vista (shivvers) Now despite how much I looooove vista, I was wondering why the OS_TOOLS partition shows up in places and recovery doesn't... especially cause niether have a hidden flag...

(As a side note, what the hell does OS_TOOLS do? google yields no answers)

View 8 Replies View Related

Ubuntu Servers :: Bootable Flag Doesn't Change

Feb 15, 2010

A week or two ago I installed Ubuntu Server 9.10 on a Intel DG945SEJT-based machine with two WD RE2-drives. I used unetbootin-windows-408.exe to to prepare a USB stick with the 32 bit version of the server version of Ubuntu. The installation went smooth without any problems.

Now when I'm trying to do the exact same thing to an almost identical server (larger HDD:s) I can't change the bootable flag to "on" on the physical raid partitions I create to host /.

I use the the following partition scheme: 10 GB /, 4 GB swap and the rest as /home. They're all on software-RAID1. Last time I did this (and many times before that) I was able to set the flag to "on".

When I press enter it just shows "updating filsystem.." etc. for some second but then nothing happens, the parameter is still on "off". This causes the whole installation to fail in the end due to an error when installing GRUB -> "can not install grub in /dev/sda "fatal error"".

My only conclusion is that the installer downloads some new files from the internet which causes this problem, as I said - nothing else is different except the harddrives (WD RE4-GP).

View 5 Replies View Related

Ubuntu :: Append Data To A File Where Immutable Flag Is Set?

Mar 10, 2010

I want to append data to a file where immutable flag is set..So i have tried this command chattr +a file_name to append data..But i am unable to append the data..

View 7 Replies View Related

Ubuntu Installation :: Delete The Partition With Flag Bootable?

Sep 6, 2010

Well I currently have a windows partition currently formatted as ext3 which has the partition flag bootable (It previously had Windows Vista on it). I also have a windows partition with NTFS filesystem with Windows 7 on it which is not bootable because the previously mentioned partition became formatted by me. And I also have more partitions for Ubuntu, which is currently the only OS working.

To show it visually: [URL]

So my question is can I delete the partition called "Inter" and recreate a new partition and format it again with ext3? It has the partition flag bootable, won't I loose all of the partitions this way? It's also the primary partition? Is there a big risk?

View 2 Replies View Related

Ubuntu :: Win7 - Changed Partition Flag To Boot

Jun 2, 2011

I just installed windows 7 and ubuntu stopped booting even though it was still there, so I thought I would just change the partition flag to boot. I found out later that I had to create a new mbr but after I changed the boot flag, windows 7 stopped booting and I tried changing it back, but it didnt work. So I was wondering if i didn't use the correct flags or is there another way to get windows 7 to boot again? I was using GParted to change the partition flags and that i am using windows 7 ultimate 64bit

View 1 Replies View Related







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