Suggests that in your /etc/mail/sendmail.cf, your relay is wrong: It should be your mail server and so you should not have 127.0.0.1 but the name of the mail server with whom your host is "chatting" with...
I've used "mailx -r return@address" before many times for automated scripts, but when I try to use it on FreeBSD, I get "mailx: illegal option -- r". Is there another version of mailx I should be using to get this to work? The full command I'm trying to run is:
mailx -s "Load Results $(date... (1 Reply)
Hi all,
While watching the log at /var/log/messages on a Centos 4.x box I keep seeing this come up
Jul 18 09:38:40 ws096 PAM_pwdb: check pass; user unknown
From what I understand this might be a ssh attack or am I wrong here?
The bad thing is that it does not show an IP address its... (1 Reply)
Hi,
I am sending mail inside my script based on various conditions.
Here is the problem,
when there are more than one condion at a time, the mailx adds the messages into one ( at the time of the second mail)
example:
inner_fn ()
{
if ; then
echo "inner function mail" | mailx... (3 Replies)
Hi guys
I am trying to send an email using mailx function and want the message body to appear on different lines.
My code is :
WT=`echo "Tapes are : $x Holder are : $y" `
echo $WT|mailx -s "Alert" xyx@abc.com
I want to receive the email like this:
Tapes are :2
Holders are... (2 Replies)
Ill try to make this brief:
I am trying to get the script below to run another script defined as BATNAM.
The script runs fine, does what i designed it to do, however...
I would like it to mailx the NEW $pid that was restarted.
This script is supposed to go in crontab as root, and run by... (8 Replies)
Hello All,
I am currently running a Solaris 10 machine as inbound SMTP server i.e. bringing Emails from outside into our company. In /var/spool/mqueue , I have mails that are pending for the past 4-5 days. They are not being delivered and are causing my mount point size to increase.
Error... (0 Replies)
Hello,
I have a file temp.txt with the below contents :
Sep 9 03:04:51 adcsdp01 MAPDR2_00: Unable to open trace file adpstartarv.log. (Error 110 Resource temporarily unavailable)
Sep 9 03:05:35 adcsdp01 MAPDR2_00: SAP Service ADPMR2_00 successfully started.
Sep 9 03:04:51 adcsdp01... (7 Replies)
Hello,
I am new to awk and I am trying to figure out how to print an output based on user input.
For example:
ubuntu:~/scripts$ steps="step1, step2, step3"
ubuntu:~/scripts$ echo $steps
step1, step2, step3
I am playing around and I got this pattern that I want:
... (3 Replies)
Hi All,
Im facing a problem with sending tar file via mailx command. Your help would be much appreciated.
Im trying to tar a set of CSV files in a folder using the below command
tar cvf Report.tar.gz *_03172016.CSV
and sending this tar file using mailx command as mentioned below
... (2 Replies)
Hi,
I am trying to send an email using mailx command in Linux terminal. Though I give invalid address it is giving response as Recipient ok and sent message. My command is here. Not sure what is wrong. Can anyone please assist?
echo -e 'New User'| mailx -v -s 'New User' y@gggg.com
... (1 Reply)
Discussion started by: yuvi
1 Replies
LEARN ABOUT CENTOS
dblink_connect
DBLINK_CONNECT(3) PostgreSQL 9.2.7 Documentation DBLINK_CONNECT(3)NAME
dblink_connect - opens a persistent connection to a remote database
SYNOPSIS
dblink_connect(text connstr) returns text
dblink_connect(text connname, text connstr) returns text
DESCRIPTION
dblink_connect() establishes a connection to a remote PostgreSQL database. The server and database to be contacted are identified through a
standard libpq connection string. Optionally, a name can be assigned to the connection. Multiple named connections can be open at once, but
only one unnamed connection is permitted at a time. The connection will persist until closed or until the database session is ended.
The connection string may also be the name of an existing foreign server. It is recommended to use the postgresql_fdw_validator when
defining the corresponding foreign-data wrapper. See the example below, as well as the following: CREATE FOREIGN DATA WRAPPER
(CREATE_FOREIGN_DATA_WRAPPER(7)), CREATE SERVER (CREATE_SERVER(7)), CREATE USER MAPPING (CREATE_USER_MAPPING(7))
ARGUMENTS
conname
The name to use for this connection; if omitted, an unnamed connection is opened, replacing any existing unnamed connection.
connstr
libpq-style connection info string, for example hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd. For details
see PQconnectdb in Section 31.1, "Database Connection Control Functions", in the documentation.
RETURN VALUE
Returns status, which is always OK (since any error causes the function to throw an error instead of returning).
NOTES
Only superusers may use dblink_connect to create non-password-authenticated connections. If non-superusers need this capability, use
dblink_connect_u instead.
It is unwise to choose connection names that contain equal signs, as this opens a risk of confusion with connection info strings in other
dblink functions.
EXAMPLES
SELECT dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
(1 row)
SELECT dblink_connect('myconn', 'dbname=postgres');
dblink_connect
----------------
OK
(1 row)
-- FOREIGN DATA WRAPPER functionality
-- Note: local connection must require password authentication for this to work properly
-- Otherwise, you will receive the following error from dblink_connect():
------------------------------------------------------------------------
-- ERROR: password is required
-- DETAIL: Non-superuser cannot connect if the server does not request a password.
-- HINT: Target server's authentication method must be changed.
CREATE USER dblink_regression_test WITH PASSWORD 'secret';
CREATE FOREIGN DATA WRAPPER postgresql VALIDATOR postgresql_fdw_validator;
CREATE SERVER fdtest FOREIGN DATA WRAPPER postgresql OPTIONS (hostaddr '127.0.0.1', dbname 'contrib_regression');
CREATE USER MAPPING FOR dblink_regression_test SERVER fdtest OPTIONS (user 'dblink_regression_test', password 'secret');
GRANT USAGE ON FOREIGN SERVER fdtest TO dblink_regression_test;
GRANT SELECT ON TABLE foo TO dblink_regression_test;
set ORIGINAL_USER :USER
c - dblink_regression_test
SELECT dblink_connect('myconn', 'fdtest');
dblink_connect
----------------
OK
(1 row)
SELECT * FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[]);
a | b | c
----+---+---------------
0 | a | {a0,b0,c0}
1 | b | {a1,b1,c1}
2 | c | {a2,b2,c2}
3 | d | {a3,b3,c3}
4 | e | {a4,b4,c4}
5 | f | {a5,b5,c5}
6 | g | {a6,b6,c6}
7 | h | {a7,b7,c7}
8 | i | {a8,b8,c8}
9 | j | {a9,b9,c9}
10 | k | {a10,b10,c10}
(11 rows)
c - :ORIGINAL_USER
REVOKE USAGE ON FOREIGN SERVER fdtest FROM dblink_regression_test;
REVOKE SELECT ON TABLE foo FROM dblink_regression_test;
DROP USER MAPPING FOR dblink_regression_test SERVER fdtest;
DROP USER dblink_regression_test;
DROP SERVER fdtest;
DROP FOREIGN DATA WRAPPER postgresql;
PostgreSQL 9.2.7 2014-02-17 DBLINK_CONNECT(3)