« first day (1654 days earlier)      last day (1697 days later) » 

9:51 AM
Hello everyone!
10:02 AM
I require some assistance. It's somewhat urgent for me and must be too straight forward for you as I'm very new to Unix.


I am unable to get data from server to a webpage.
How to do that?
Anyone there? :/
10:54 AM
@UncaughtException You're going to have to be a little bit more specific than that
1 hour later…
12:04 PM
Ok don't know if this is the right 'forum' for this but I really need help with this: unix.stackexchange.com/q/196422/109083
I need to have apticron working so I don't have to keep logging into various servers and running apt-get update && apt-get dist-upgrade all the time. Both mail and mailx work fine with my MTA settings (ssmtp) but apticron breaks every time with the same error message (listed in the full question above).
@py4on Sorry, don't know anything about it. Could you confirm that both mail and mailx work when run manually as root?
AH! I didn't think to try this..
I've only been testing them with my own user account
Ok I'm getting:
send-mail: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postdrop: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
@py4on OK, so the problem is that root can't run it. As I said though, I have no experience with this kind of thing so I can't really help. Update your question and add this information, however, it makes a big difference.
@terdon thanks so much will do this now
Good luck, sorry I can't be of more help.
I see you left derobert a comment, he'll probably be able to help, he knows this stuff.
3 hours later…
3:30 PM
@py4on I got that ping... one problem is I've not actually used ssmtp... But anyway, that's the log of its SMTP transaction with the mail relay it's sending to?
@terdon I commented.
Good, 'cause I don't know anything about mail stuff.
@py4on If so, first thing is it's doing that only on the SMTP envelope—good, that makes it easier to debug. Would be much more a PITA if it were doing it on the body.
@py4on What user, etc. you're running it as shouldn't matter, as the remote mail server doesn't know. Only the two addresses given (the MAIL FROM and RCPT TO)
@py4on oh, and btw... AUTH LOGIN stuff IS SECRET. You posted your base64-encoded username (but thankfully not password, the log didn't include that).
@derobert He seems to be able to send as a normal user but not as root which suggests that something is different in the relevant rc files.
@terdon I removed the username from the question, presuming he wants to keep that secret, but to actually do it the revisions containing it need to be purged...
3:39 PM
@derobert Hang on, I'll ask a CM to do it.
@terdon I'd guess the MAIL FROM addresses are different. That'd make sense that different users have different email addresses.
I asked them to purge the history, so we'll see.
PSA: When you see random strings of gibberish in your logs, especially as part of authentication, think twice before posting those to the Internet...
@py4on that warning sounds like something you can ignore, unless you have IPv6 connectivity.
@terdon looks like the CM deleted those revisions
@py4on OK, I've edited your username out of your question, and @terdon has gotten a StackExchange community manager to delete the revisions that contained it. So it's not exposed anymore. Though we've run out of brain bleach, so anyone who saw it in the several hours it was there has still seen it.
Yup, all done.
Thank you!
(to both of you)
I presumed this wasn't a risk as the email address was hidden but will leave it out in future!
3:53 PM
@py4on Ah, OK. You redacted even your domain name, so I figured you wanted to keep them private.
@derobert that's very thoughtful of you.
yes @derobert thank you
And you too, @terdon.
@py4on did you see my comment about exim? Or are you sure that the problem is on the MTA side?
Also @FaheemMitha I removed ssmtp and replaced it with exim4 but couldn't get that to work with smarhost unfortunately (probably my own lack of experience setting up exim) so have gone back to ssmtp to try and fix this
If those are the logs from talking to the remote mail server (and I'm pretty sure they are), it can only be from something "said" in that conversation.
3:56 PM
@FaheemMitha All I did was bug someone else, that's easy :)
I can't actually believe it's not possible to somehow diagnose what root is doing differently to the standard user account when interacting with ssmtp
I'm good at bugging people.
Oh, btw, your EHLO string is weird. That should just be a host name, not an email...
Ok.. Should I post my redacted (!) ssmtp.conf file?
Well, you should compare a mail -v from a working account vs. root
3:58 PM
@py4on Huh. Is there some reason you prefer ssmtp? Just curious.
That log should differ.
@derobert you use exim, right?
@FaheemMitha Presumably for being much simpler and lightweight than exim.
@FaheemMitha I've always just found it easier to set up that's all - probably lazy
@FaheemMitha yeah, but I'm using it as a full mailserver
3:58 PM
Postfix is another option, but I've always found exim quite easy to deal with. And the Debian maintainers are quite helpful. Mark Haber, at any rate.
@derobert Ok. But I find exim is quite Ok for small projects.
Yes and also I'm just using an MTA to hand everything off to a smarthost
@py4on Me too. But I use exim for that. It's perfectly usable. Unfortunately the main documentation is proprietary. Bummer.
But I got someone to buy the Exim book for me to use, then I stole it. So I have it on my bookshelf. Getting people to buy books for you is the best.
Also, crime does pay.
Ok haha - just sanitising the mail -v output now
@FaheemMitha the main documentation? Isn't the exim spec on the web site and under the GPL?
@derobert do you use the exim book much? The actual paper one that Hazel wrote.
@derobert See comment above. :-)
4:04 PM
I don't have that book. Didn't even remember it existed. I just use the spec as documentation...
Should I just paste in or upload as txt file?
it's a few lines, just paste it
[<-] 220 and/or bulk e-mail.
[->] EHLO [user]@[mydomain].com
[<-] 250 HELP
[<-] 334 [xxxx]
[->] [xxxxxx]
[<-] 334 [xxxxxx]
[<-] 235 Authentication succeeded
[->] MAIL FROM:[user]@[mydomain].com
[<-] 250 OK
[->] RCPT TO:<[user]@[recipient].com>
[<-] 250 Accepted
[->] DATA
[<-] 354 Enter message, ending with "." on a line by itself
[->] Received: by [user]@[mydomain].com (sSMTP sendmail emulation); Mon, 20 Apr 2015 17:00:00 +0100
[->] From: [user]@[mydomain].com
[->] Date: Mon, 20 Apr 2015 17:00:00 +0100
That's what a successful mail -v output looks like from my standard user account
the two email addresses you redacted—are they the same as the ones from root?
just getting full mail -v output from root now
No. root is somehow changing the MAIL FROM: to root@[mydomain].com
4:08 PM
Ok—I thought from your question that changing FromLineOverride fixed that? I guess not?
Great avatar:
While you can temporarily get around this by passing -S from=xxx to mail or mailx this: 1) still doesn't allow root to send even though the 'FROM' address changes and 2) doesn't address the real situation I need it to work with which is apticron
@py4on Does the MAIL FROM address change, or just the From: in the header of the message? Those two are entirely different...
YES Progress finally!! root now has decided to send when -S from=xxx is passed to it!
Now I just have to find a way of getting this to work with apticron..
@derobert Oh. I've found the book moderately useful.
4:17 PM
Ok I've modified /usr/sbin/apticron to pass -S to mailx and am forcing it to run now with root. Will let you know what happens..
@py4on be back in a little, something urgent came up...
Ok @derobert thank you for all the help. Email from apticron just came through so fiddling with it's mailx function worked! I'll update my question now with an answer but this seems a little ridiculous as a solution for a script that's meant to run as root only... I'm presuming I should report this as a pretty major flaw to them somewhere?
Thank you to @terdon and @FaheemMitha also
sorry for messing this feed up!
@py4on You haven't, this is precisely what it's for.
@py4on (still half paying attention) something is amiss with your address rewriting config in ssmtp. Presuming it does that...
4:34 PM
@jasonwryan - you have earned my respect once again, Thank you. If you were to offer that comment you made as an answer I would upvote it - though I do not agree with its sentiment.
@py4on Is this some bug then?
One good reason for using exim is that it is well supported and predictable. And lots of people use it. So less surprises.
Or I've somehow bungled ssmtp.conf - will upload a sanitised one as I don't want to post an answer that's 'hackish' when it could just require a config file modification
The exim debconf script automatically generates a config. Works well, though people seem to have mixed feelings about it.
@py4on talking to our good friend Google (as remember I don't run ssmtp), do you have an /etc/ssmtp/revaliases?
That's apparently where you'd set the email address to use for root. wiki.archlinux.org/index.php/SSMTP
Aha! @derobert will try this running an unmodified apticron
4:51 PM
You might want to set FromLineOverride back to no as well.
will do..
@derobert learning all about ssmtp? :-)
@FaheemMitha from Google, yes. It is indeed much simpler than exim.
@derobert Oh. I've always felt quite comfortable with exim. Never tried ssmtp.
@derobert you've done it!! Post as answer and I'll accept!
4:56 PM
@derobert so, what was the problem? incorrect config?
Say I have a text file with a /path/filename.ext per line. How do I rm them all?
@FaheemMitha I needed to specify what root uses in /etc/ssmtp/revaliases. Different from the /etc/ssmtp/ssmtp.conf file everything else seems to use
@FaheemMitha when I tried setting up exim4 (admittedly via my phone's tiny ssh client) I couldn't see how you setup SSL/TLS for a server that doesn't support STARTTLS. ssmtp just requires the option UseTLS=YES
@py4on I see.
@ThatBrazilianGuy while read -r file; do rm -- "$file"; done < list.txt
@py4on posted, does that cover it?
A: root can't send mail (apticron) but user can (mail/mailx)

derobertYour remote mail server doesn't believe root@yourdomain in the SMTP envelope¹ is a valid email address, so it's refusing messages from you. And that's where apticron is trying to send from, so it doesn't work. ssmtp allows you to override the default email address and relay on a per-user basis i...

5:06 PM
@ThatBrazilianGuy or, if your file names contain no spaces or other strangeness, you could just do xargs rm < list.txt. See this Q&A on AU for more:
Q: How to delete files listed in a text file

sudomanI have a text file that has a list of paths to various files. Is there a command I can use that will iterate thorough each line and delete the file at the stated path?

@derobert how does exim compare here?
@FaheemMitha with the Debian exim setup, you'd use /etc/email-addresses
@derobert perfectly. So helpful - I'm now configuring ssmtp / apticron on my other servers properly
@derobert yes, that's what I was just looking at.
Is that not a standard thing then?
@FaheemMitha it comes from 31_exim4-config_rewriting
### rewrite/31_exim4-config_rewriting

# This rewriting rule is particularily useful for dialup users who
# don't have their own domain, but could be useful for anyone.
# It looks up the real address of all local users in a file
*@+local_domains "${lookup{${local_part}}lsearch{/etc/email-addresses}\
                   {$value}fail}" Ffrs
# identical rewriting rule for /etc/mailname
*@ETC_MAILNAME "${lookup{${local_part}}lsearch{/etc/email-addresses}\
that's jessie, wheezy might look slightly different of course
5:09 PM
/etc/email-addresses that is.
@derobert I usually link to the chat history in such cases. But it's up to you.
@derobert Oh, I see. I always thought it was an exim builtin.
Is it normal to get +2 for accepting an answer?
@py4on Yes
I see we are approaching the jessie release. Less than a week.
@FaheemMitha added. Chromium has decided to make that difficult, BTW, as it has decided to no longer allow right-clicking links. (WTF)
@derobert er, what?
Is this a newer version of Chromium?
5:13 PM
I'm guessing it just needs restarting. Have an update to apply anyway, so.... time to restart it.
Either that, or maybe it's a new feature. Like how Chrome now only lets flash full-screen once per window (yes, per window) on my media PC.
Yep, after restarting it, I can right-click links again.
@FaheemMitha BTW: Appears the libxrender security update mess is fixed.
5:31 PM
@derobert yes, that one was fixed a few days ago.
5:44 PM
They really should check how it got past the autobuilders.
I'm on chromium 37 (wheezy). Is 41 (jessie) worse in any significant respect?
@FaheemMitha Well, they finally got compose working again. So not that I'm aware of. Other than possibly that flash full-screen thing, but maybe that's actually a flash bug.
Back up your Chromium profile, you can't downgrade it.
@derobert Don't follow. You mean upgrade?
@FaheemMitha I mean, if you decide 41 is terrible and want to go back.
@derobert Oh. Ok. Is going back even an option?
@FaheemMitha If you back up your v37 profile, it probably is, with enough work.
Not sure if you can get the v37 deb to install on Jessie.
I suppose you could always use a wheezy chroot or vm. So it's possible, somehow.
Or if you don't leave it running for days on end, just upgrade to Iceweasel...
Anyway, lunch time.
5:58 PM
@derobert Rebuilding it would probably be easier.
6:11 PM
@derobert Phew, you scared me for a second there.
2 hours later…
8:34 PM
@derobert I don't supposed you have reformed your ways and chosen the path of Mercurial, have you?
@FaheemMitha Nope.
@derobert I thought not.
2 hours later…
10:31 PM
63 messages moved to Take five

« first day (1654 days earlier)      last day (1697 days later) »