I have access to Postfix's mail.log file.
In order to tell how many messages were actually sent, how can I check this log file? Is there a specific string that I can grep for.
I have access to Postfix's mail.log file.
In order to tell how many messages were actually sent, how can I check this log file? Is there a specific string that I can grep for.
I have a site (running Apache and PHP) that allows users to download JPEGs. The user clicks once on a link to download the JPEG, the same as when you download a zip file (not using right-click save-as).
The PHP script that handles the download add these headers:
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=download.jpg');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file_final));
Opera users, with the Opera Turbo feature switched on, are having a problem.
Instead of getting the JPEGs, they get files that have been compressed by Opera's server. (I think they are WebP images, they begin with RIFFÞÃ WEBPVP8
). They appear the same in the browser, but when user downloads them to their desktop, they can't use them.
How can I configure my web server to prevent Opera Turbo from compressing JPEGs? Is there a HTTP header I can send?
On a Linux server (RHEL 6.2) with a 50GB drive, disk usage which is normally around 57% spiked for about an hour to 100%. It has returned to normal again.
Is there some way to find out what files were created or deleted around that time?
Short version: I have a Linux server (RHEL5) and a Windows 7 Professional laptop on a local wired network. Copying large files to the server gets gradually slower until it stops completely.
Long version
There is a Samba share on the server, which I can connect to, and I have read/write access.
All transfers from the server to the laptop work fine, but transfers from the laptop to the server seem to have their speed throttled, and sometimes fail completely.
Small files transfer ok, but files over about 2MB generally fail.
To test if this was a Samba issue or something else, I tried copying some files from the laptop to the server using scp
(Putty's pscp
). A 1MB file copies almost instantly, 2MB takes 3 minutes, and 3.7MB takes 18 minutes. So it is not specific to Samba.
Also, with both Samba and SCP I can copy several MB of very small files without issue.
What could be causing this behaviour? I would be very grateful for any advice.
Windows gives this error message:
There is a problem accessing H:\
Make sure you are connected to the network and try again
On the server, ifconfig
shows some errors:
eth0 Link encap:Ethernet HWaddr 00:22:19:AD:52:E2
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::222:19ff:fead:52e2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4125439 errors:72181 dropped:0 overruns:0 frame:0
TX packets:3575918 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4481289749 (4.1 GiB) TX bytes:581533090 (554.5 MiB)
Interrupt:169 Memory:dfdf0000-dfe00000
/var/log/messages
:
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:read_data(540)
Aug 16 14:50:16 dev smbd[475]: read_data: read failure for 4 bytes to client 192.168.1.12. Error = Connection reset by peer
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:write_data(568)
Aug 16 14:50:16 dev smbd[475]: write_data: write failure in writing to client 192.168.1.12. Error Broken pipe
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:send_smb(767)
Aug 16 14:50:16 dev smbd[475]: Error writing 75 bytes to client. -1. (Broken pipe)
/var/log/samba/smbd.log
:
[2013/08/16 14:50:16, 0] lib/util_sock.c:read_data(540)
read_data: read failure for 4 bytes to client 192.168.1.12. Error = Connection reset by peer
[2013/08/16 14:50:16, 0] lib/util_sock.c:write_data(568)
write_data: write failure in writing to client 192.168.1.12. Error Broken pipe
[2013/08/16 14:50:16, 0] lib/util_sock.c:send_smb(767)
Error writing 75 bytes to client. -1. (Broken pipe)
[2013/08/16 14:50:16, 1] smbd/service.c:make_connection_snum(1077)
liam-pc (192.168.1.12) connect to service external initially as user liam (uid=502, gid=502) (pid 529)
EDIT: If I boot into Ubuntu on the laptop I have no problem copying large files to the SMB share on the server. So the issue is either with Windows 7, or with the Windows 7/RHEL5 combination.
I have an email account [email protected] with mail.live.com .
I also have a Gmail account. I have set up the 'Send mail as' feature in Gmail to send mail as [email protected], and this works correctly.
My question is, if I send an email from Gmail 'as' [email protected], how does the recipient's server verify that Gmail was authorized to send mail for example.com?
I have some knowledge of SPF records, and I know that the SPF record for example.com says that only messages originating from hotmail.com servers are valid.
The message that Gmail sends out has the @gmail.com address in the Return-Path and Sender fields, and so the SPF check is done against gmail.com and not example.com.
I have tested this with the test service at verifier.port25.com and it passes.
SPF check: pass
DomainKeys check: neutral
DKIM check: pass
Sender-ID check: pass
SpamAssassin check: ham
I want to build PHP 5.3.9 on RHEL 6.2 with Tidy support. I get this message:
configure: error: Cannot find libtidy
So I try to install libtidy:
yum install libtidy libtidy-devel
but libtidy-devel is not available:
Package libtidy-0.99.0-19.20070615.1.el6.x86_64 already installed and latest version
No package libtidy-devel available.
Nothing to do
Shouldn't libtidy-devel be in Red Hat's repo? What should I do?
I need to add MySQL support to my PHP installation on RHEL4. I need to rebuild PHP from source due to other extensions that are required. Will Apache be down for a few seconds when I restart it, or will I need to stop it while I install PHP?
I thought I could use:
mail -s "Subject_here" -a "In-Reply-To: Message_ID_here" < body
but unfortunately the -a
is unrecognised.
I have a Windows share mounted on a Linux server (RHEL4) using a mount
command like this:
mount -t smbfs //server_ip/foldername /servername/foldername -o username=USERNAME,password=PASSWORD -o gid=users,dmask=777,fmask=777,rw,noatime
It stays working for weeks at a time but sometimes stops working, at which time I unmount it and mount it again. This works but the share would have been unavailable for some time before I noticed it in log files.
Is there some way that the share can be automatically remounted when it fails?
Where could I find a old RPM of MySQL client utilities. I am not sure which one, all I know is that Apache fails to load PHP with this message:
httpd: Syntax error on line 3 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: libmysqlclient.so.14: cannot open shared object file: No such file or directory
I want to remove an old version of MySQL (using rpm) on a RHEL4 server and I found that a dovecot package depends on it. If dovecot is not needed then I could remove that too. How can I determine if dovecot is being used on this server? Are there any log files that would show its past use?
How can I set up an email notification on a Linux server for when a disk/volume exceeds a certain usage quota?
What is the best way to automatically backup a Postgres database on Linux every day?
I am using the mount
command on a Linux server to access a Windows server using smbfs. Can I use noatime
to prevent read operations (such as cp
on Linux) from changing the last-accessed time on files on the Windows server?
If so how can I do this?
I have a Windows service that exits unexpectedly every few days. Is there a simple way to monitor it to make sure it gets restarted quickly if it crashes?